Xtremer360 Posted November 23, 2012 Share Posted November 23, 2012 I'm trying to figure out what the heck is going on here because I've never had this happen before. When I run this bit of code I receive ONE for the count but when it prints the array all it does is <pre></pre> as if there is nothing in it. I'm confused. <?php echo count($titles); echo '<pre>'; print_r($titles); echo '</pre>'; die(); if (count($titles) > 0) { foreach ($titles AS $title) { } } ?> Quote Link to comment https://forums.phpfreaks.com/topic/271078-pritting-array-when-no-array-is-empty/ Share on other sites More sharing options...
PFMaBiSmAd Posted November 23, 2012 Share Posted November 23, 2012 What does the 'view source' of the output in your browser show? Quote Link to comment https://forums.phpfreaks.com/topic/271078-pritting-array-when-no-array-is-empty/#findComment-1394630 Share on other sites More sharing options...
Xtremer360 Posted November 23, 2012 Author Share Posted November 23, 2012 My apologies I was returned false in the query when no results were found and testing it incorrectly. This topic is solved. Quote Link to comment https://forums.phpfreaks.com/topic/271078-pritting-array-when-no-array-is-empty/#findComment-1394634 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.