hi i am trying to call the Persons() from the user_friends() to get the data for the users it can grab 1 array but when its a multiple array i get this 1111ttTTdd1111110011ee00pp22ttUUPP1111iiSSWWRRii2211HHBB
can some one help me please.
<?php
class profile {
// Get Person
public function Persons($uid)
{
foreach($uid as $i)
{
$id=$i['friend'];
$query = "SELECT * FROM afa_users WHERE user_id='$id'";
$command = mysql_query ($query);
$profile = mysql_fetch_array ($command);
}
$data=$profile;
return $data;
}
//Get Persons Friends
public function user_friends($uid)
{
$query = mysql_query("SELECT * FROM afa_friends WHERE user='$uid' ORDER BY user DESC") or die(mysql_error());
while($row=mysql_fetch_array($query))
{
$uids[]=$row;
$person = $this->Persons($uids);
$person=array($person);
return array_pop($person);
}
}
}
?>