Posted by Jahjah92 on 08/15/06 10:24
if you talk about rows and not about columns, try this :
$row0 = mysql_fetch_array($result);
$row1 = mysql_fetch_array($result);
extract $row0;
extract $row1;
echo $row0[0]; //var 1 of row 0
echo $row1[0]; //var 1 of row 1
A+
"monomaniac21" <mcyi2mr3@googlemail.com> a ιcrit dans le message de news:
1155631883.433492.177770@i3g2000cwc.googlegroups.com...
> hi all
>
> im querying a db for two rows which are always returned. how can i
> reference each row and output its contents without using a while loop.
> ive tried:
>
> $row = mysql_fetch_array($result);
> extract $row;
> echo $var1[0]; //var 1 of row 0
> echo $var1[1]; //var 1 of row 1
>
>
> but this doesnt seem to be working?
>
> kind regards
>
> Marc
>
[Back to original message]
|