PHP: Newbie question...
| From: | Premchandran C. V | Date: | Mon, 09 Oct 2000 09:21:15 +0000 |
| Subject: | PHP: Newbie question... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19167@lists.php.net to get a copy of this message | ||
Hi PHPies,
Firstly to say that I've got PHP/MySQL running on my Wintel 98/PWS without any glitches (nothing proud, though) at the very first attempt, even got the php.ini settings without any difficulty.
Well, I'm new to PHP and just have a small question (may be I'm missing something). I've got a php program that I want to display the list of all the values that are available in the HTTP_USER_AGENT array. But I believe there's something wrong in the code. Please do have a look at the code and let me know what I'm missing.
<the phpcode>
<?php
function list_array ($array) {
while (list ($key, $value) = each ($array)) {
$str .= "<b>$key:</b> $value<br>\n";
}
return $str;
}
echo "$HTTP_USER_AGENT<hr>\n";
$browser = get_browser($HTTP_USER_AGENT);
echo list_array ((array) $browser);
?>
</the phpcode>
T I A for any words of wisdom.
Regards
Prem
~~~~~~~~~~~~
premchandran c.v
webmaster, www.ciol.com