Error in php project Programming Web Development by ajay@7838 … class='albumDetail'> <a href='find_holiday.php?goto=Leh Ladakh'><img class='img-responsive imghover' src='upload/$r…='220' height='150' > <span class='albumtitle'>Leh Ladakh</span> </a> </div> <… Re: Error in php project Programming Web Development by rproffitt Line 7 conforms to neither method documented at https://www.php.net/manual/en/mysqli-result.fetch-array.php Time to read that page and pick a style. Re: Error in php project Programming Web Development by Dani I'm not sure what you mean, rproffitt? It looks like he's looping through each row in the result set generated from query $q, and saving the row in an array $r for the iteration of the loop. That's what I do as well. Re: Error in php project Programming Web Development by rproffitt Line 7's call can have an object oriented or procedural style. While it looks like he's doing that, the line does not look valid to me. This is why I supplied a link to the documentation. Re: Error in php project Programming Web Development by alan.davies I'm assuming mysqli query is returning false, hence the boolean msg. Re: Error in php project Programming Web Development by rproffitt OK, here's the example for the object oriented method. $query = "SELECT Name, CountryCode FROM City ORDER by ID LIMIT 3"; $result = $mysqli->query($query); /* numeric array */ $row = $result->fetch_array(MYSQLI_NUM); Line 7 in the OP's source is incorrect in my view as the $q is well, unexpected. … Re: Error in php project Programming Web Development by alan.davies While I like the oop method, I can't see anything wrong with the procedural code other than I'd enclose the whole thing in a conditional. As in `if($q =....) ` Re: Error in php project Programming Web Development by rproffitt Then again if line 6 fails so will 7. OP needs to test for that. Re: Error in php project Programming Web Development by alan.davies >Then again if line 6 fails so will 7. OP needs to test for that. That was my point. I believe Line 6 is returning 'false'. From the manual on `mysqli_query`: >Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() will return a mysqli_result object. For other successful queries mysqli_query() …