Possible Duplicate:
mysql_fetch_array() expects parameter 1 to be resource, boolean given in select
I dedicated this question for those who have read book 'PHP For Absolute Beginners' (Apress, Jason Lengstorf). I got error when trying example on page 151 :
function.inc.php :
array_push($e, $fulldisp);
return $e;
index.php :
$fulldisp = array_pop($e);
You can view full code here - http://pastebin.com/bpjAbguM
And browser give error :
Warning: array_push() expects parameter 1 to be array, boolean given in C:\xampp\htdocs\simple_blog\inc\functions.inc.php on line 43
Warning: array_pop() expects parameter 1 to be array, boolean given in C:\xampp\htdocs\simple_blog\index.php on line 16
$e
isn't an array - I think you need to work backwards from the error, doing avar_dump
of$e
so you can see what it contains and where it's being set. – JoLoCo Oct 18 '11 at 22:05var_dump($e)
andvar_dump($fulldisp)
and see what's there – user973254 Oct 18 '11 at 22:07