Frage
OT: PHP looping through an array
When I build a recordset, I create an array, right?
So, if I have this -
mysql_select_db($database_touchstone, $touchstone);
$query_rsCategory = "SELECT DISTINCT tclientsCategory FROM
tbl_orderedclients";
$rsCategory = mysql_query($query_rsCategory, $touchstone) or
die(mysql_error());
$row_rsCategory = mysql_fetch_assoc($rsCategory);
$totalRows_rsCategory = mysql_num_rows($rsCategory);
The variable called $row_rsCategory contains an array of all values in the
recordset, right?
So, why can't I get those values like this?
foreach ($row_rsCategory as $value) {
echo $value."<br>";
}
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
So, if I have this -
mysql_select_db($database_touchstone, $touchstone);
$query_rsCategory = "SELECT DISTINCT tclientsCategory FROM
tbl_orderedclients";
$rsCategory = mysql_query($query_rsCategory, $touchstone) or
die(mysql_error());
$row_rsCategory = mysql_fetch_assoc($rsCategory);
$totalRows_rsCategory = mysql_num_rows($rsCategory);
The variable called $row_rsCategory contains an array of all values in the
recordset, right?
So, why can't I get those values like this?
foreach ($row_rsCategory as $value) {
echo $value."<br>";
}
--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================
