Jump to content

Pritting Array When No Array Is Empty


Xtremer360

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.