jwer78 Posted November 13, 2007 Share Posted November 13, 2007 I need to run a check to see if an array is null. Here is the section I am having problems with. Any help would be greatly appreciated. $bowl_query=mysql_query($bowl_sql); while($bowl_array=mysql_fetch_array($bowl_query)){ $amt=$bowl_array['subtrans_paid']; if($bowl_array='NULL'){ $bowl_award="DUE"; } if($amt > '3.00'){ $bowl_award="Yes"; }else{ $bowl_award="No"; } Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted November 13, 2007 Share Posted November 13, 2007 NULL is a PHP constant, not a string. Remove the single quotes from around it if($bowl_array = NULL) PhREEEk Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted November 13, 2007 Share Posted November 13, 2007 why not just check before you do a while loop by saing if(mysql_num_rows($bowl_query) >0){ while/// }//end while }//end if else{ no results } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.