I wanted to ask why should I use (used in foreach -> ) mysqli_fetch_array($result, MYSQLI_ASSOC) if foreach ($result as $row) gives the same result ...
I wanted to ask why should I use (used in foreach -> ) mysqli_fetch_array($result, MYSQLI_ASSOC) if foreach ($result as $row) gives the same result ...
I have this code where am able to perfectly get all values from the database using php mysqli_fetch_array with while loop In the code above I did o ...
I am creating a function that is suppose to get the first name and last name from the database and return the query. Something is not right about it t ...
I'm a complete newbie in PHP and I just don't understand how while loop works with mysqli_fetch_assoc. The former execute statements based upon expres ...
My php code is as follows: This is part of a quiz where I am displaying one question and 4 multiple choices in html page via ajax jQuery. I know how t ...
Why cant the output three values store in the array with indexes as number ? its giving error as follows: Notice: Undefined offset: 1 in F:\xampp\ ...
I used mysqli_fetch_assoc function to fetch the rows in a decreasing order but when I echo the associative array of table "posts"(there are only three ...
EDIT: I'm trying to display category names of my categories table inside select HTML dropdown, but I'm getting Illegal string offset error a ...
I am attempting to build a graph in morrisjs using php/mysql and need to output an object with the following format. It should group the period dates ...
What I'm trying to do is to assign variables based upon a sql query. The field "County" is a varchar containing the names of Counties. What happens ...
I'm this is my first coding project from school. I have a task to check, whether two conditions are true and if they are, I have to count the occurren ...
The following PHP code, I tried to retrieve some values from the table by "word" column which happy, like, free and help are in this column. my out ...
I want the dropdown to show the "client_code", "name" in one line. It almost works but not 100%. I am a beginner with php and SQL, can someone help me ...
I'm working on a system, and this module is supposed to echo the contents of the database. It worked perfectly until I added some JOIN statements to ...
I'm new to mysqli and am upgrading all my code to use it. I understand functions now need to have the $conn variable included with them. Here is my ...
I am new to OOP in PHP and MYSQL. I looked for the solutions everywhere but could not find exactly what I am looking for. I am facing with the Fa ...
I have code like this: mysqli_fetch_array($result) I do not seem to have any errors with this, but all samples that I have seen online have a second ...