Hey,
Trying to run the following function in a while statement:
function func_userinfo($user) {
$userinfo = func_query_first("SELECT fld_name FROM tbl_users WHERE fld_id = $user");
$fld_name_output = $userinfo["fld_name"];
echo $fld_name_output;
}
This is the snippet of code that shows the while statement. I have another function called db_fetch_array in there.
while($row = db_fetch_array($result)) // print results
{
?>
<p><strong>Added by</strong> <? func_userinfo($row['fld_id']); ?> <strong>on</strong> <? echo $row['fld_date']; ?> <strong>at</strong> <? echo $row['fld_time']; ?></p>
<p><? echo nl2br($row['fld_text']); ?></p>
<hr>
<?
} // end " while($row = mysql_fetch_array($result)) "
Now, the first entry outputs the correct name, but the second displays nothing.
Any ideas, driving me mental.
Cheers,
Chris