I copy and paste this example code, that is supposed to list everything about your browser, into a .php file.
<?php
function list_array ($array)
{
while (list ($key, $value) = each ($array))
{
$str .= "<b>$key:</b> $value<br>\n";
}
return $str;
}
$Result = get_browser($_SERVER['HTTP_USER_AGENT']);
echo list_array ((array) $Result);
?>
This results in an error and an odd output:
Notice: Undefined variable: str in C:\Program Files\Apache Group\Apache2\htdocs\visitors\index.php on line 32
0:
That 0: is the output.
Please help me, what's wrong? The code? My ini settings? what?
I've been roamin the net for a day trying to learn how to use get_browser() with no luck, so any links to a good explination of it would be gratefull.