note 33804 deleted from function.is-bool by aidan
| From: | aidan@php.net | Date: | Sun, 05 Sep 2004 09:07:04 +0000 |
| Subject: | note 33804 deleted from function.is-bool by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76061@lists.php.net to get a copy of this message | ||
Note Submitter: daevid at daevid dot com
----
Because PHP annoyingly doesn't convert booleans to any sort of printable value when you echo or
print them, use a little function like this:
function printArray($myArray)
{
reset ($myArray);
while (list ($key, $val) = each ($myArray))
{
if (is_bool($val)) $val = ($val) ? "true" : "false";
echo "[$key] => $val<BR>\n";
}
}