sorry i pasted the code i was messing about with here i the 1 i was useing
$sql="SELECT * from friends as a,users as b where a.addid='$rprofile[ID]' and b.ID=a.addedid LIMIT 0,9";
$resultset = mysql_query($sql);
while($record = mysql_fetch_assoc($resultset));
$record[] = $records;
function render_table($records, $display_columns=3)
{
$padding = ($display_columns - 1) - (($count - 1)%$display_columns);
echo '<table>';
for($i=0; $i<$count; $i++)
{
if($i % $display_columns == 0)
echo '<tr>';
echo '<td>';
render_cell($records[$i]);
echo '</td>';
if($i % $display_columns == $display_columns - 1)
echo '</tr>';
}
if($padding != 0)
{
for($i=0; $i<$padding; $i++)
echo '<td></td>';
echo '</tr>';
}
echo '</table>';
}
function render_cell($record)
{
$user = $record['username'];
$image = $record['mainpath'];
echo "<a href='$user'><img src='photos/$user/$image' title='$user' alt='$user' /></a>";
}
render_table($result1);
even if i romove $record[] = $records; and change the bottom the top function sql strings back to record it just out puts the same and that nothing
its not realy the sql thats fine works on other things just functions they do my headin