Posted by Giovanni on 01/25/08 20:44
Hi! I've an array of string like this:
$arraystring["name"]="John";
$arraystring["age"]="50";
$arraystring["work"]="teacher";
$arraystring is global variable.
I'm trying to code a function that get a string as parameter and print
the relative arraystring's value.
function printArrayStr($key)
{
global $arraystring;
echo $arraystring["$key"];
}
What do I wrong?! :(
tnx, people!
[Back to original message]
|