I have an array that goes like this:
$myarray = Array(
"Name" => "Fred",
"Age" => 30,
"Name" => "John"
"Age" => 25
);
How can I get only unique keys in this array.
I've tried:
foreach(unique(array_keys($myarray)) as $k)
{
echo "$k<BR>";
}
and it outputs nothing...
And tried:
$mykeys = Array(array_keys($myarray));
$unique = array_unique($mykeys);
doesn't work, still prints two times the keys...
Please HELP!