Hello
I have this portion of code:
So it should start at id = 1, which should make $ar_row['name'] start at 1, giving the value of "General" (from the db), but it only starts at the 2nd one (ie the 2nd row from my db)PHP Code:$ar_query = "SELECT id,name FROM categories";
$ar_result = mysql_query($ar_query) or die(mysql_error());
$ar_row = mysql_fetch_array($ar_result) or die(mysql_error());
while($ar_row = mysql_fetch_array($ar_result)){
echo "on row:" . $ar_row['id'] . "<br>";
$cat_names[$ar_row['id']] = $ar_row['name'];
}
Any ideas?


LinkBack URL
About LinkBacks
Reply With Quote
SCAN.care@HEXUS
