Thanks! mysql_fetch_assoc did the trick.
At 07:08 3/25/2004, Ryszard Hapka wrote:
>not only foreach ;)
>
>$r = mysql_query("select * from table");
>while($t = mysql_fetch_assoc($r)) { // or while ($t =
>mysql_fetch_array($r)) <-- you will see difrends
>foreach($t as $key => $value) {
>
not only foreach ;)
$r = mysql_query("select * from table");
while($t = mysql_fetch_assoc($r)) { // or while ($t =
mysql_fetch_array($r)) <-- you will see difrends
foreach($t as $key => $value) {
echo "[".$key."] ".$value ."";
}
echo "";
}
Ryszard Hapka wrote:
Hi!
use foreach
Hi!
use foreach (www.php.net/foreach).
Ryszard
W. D. wrote:
Hi Folks,
I am trying to display a list of retrieved records, but can't seem
to figure out how to do this properly. Here is what I am aiming
for:
$result = mysql_query($SQLqry);
$NumRows = mysql_num_rows($result);
$NumFields = mysq
Hi Folks,
I am trying to display a list of retrieved records, but can't seem
to figure out how to do this properly. Here is what I am aiming
for:
\n";
// Loop through the fields
for ($FieldIdx = 1; $FieldIdx <= NumFields; $FieldIdx++)
{
// Display the fields and associated data