Hi,
Code below returns this.
Array
(
[0] => 3
[id] => 3
[1] => John
[name] => John
[2] => Goog
[surname] => Goog
)
Everything repeated. Why? Also, I need to serialize. I need it for some other reason.
$sql="SELECT * FROM friends WHERE id='3'";
$runSql=mysql_query($sql);
if(mysql_num_rows($runSql)>0){
$newArray=mysql_fetch_array($runSql);
return serialize($newArray);
} else {
return "ERROR: No friend found";
}
echo "<pre>";
print_r(unserialize($response));
Thanks