This code is acting weird like if I put the row "friendname" it wont show up at all.

<?
$gar = mysql_query( "SELECT * FROM friends WHERE username='".$row['username']."'") or die(mysql_error()); //gets requests 
while ($reqs = mysql_fetch_array($gar)) 
{ 
echo ' ';
echo $row['friendname'];
echo ' ';
}
?>

it should be while ([B]$row[/B] = mysql_fetch_assoc($gar))

commented: Thanks it worked like a charm! =) +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.