Simple @#%@#% array/function not working....
| From: | Ryan A | Date: | Sun, 11 May 2003 14:13:31 +0000 |
| Subject: | Simple @#%@#% array/function not working.... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-147204@lists.php.net to get a copy of this message | ||
Hi,
Am kind of new to php and brand new to arrays so please excuse me if this is
a stupid way of doing things.
I have an array and its working fine, but when i try to call a function that
checks if the array isset i dont get the required output.
Heres the code below:
if (is_array($id)) { print "<pre>\$id = "; print_r($id); print
"</pre>\n"; } //working fine
$result = count ($id); //working fine
print($result); //working fine
function one()
{
if(isset($id[0]))
return("test=".$id[0]);
}
echo "<h1>testing".one()."</h1>"; //HERES the problem, this is only
printing "testing" instaed of "testing(array value)"
Any ideas?
Thanks in advance,
-Ryan