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) { } } ?> 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? 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. 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
Archived
This topic is now archived and is closed to further replies.