Parse errors bouncing from line to line?
Posted: Mon May 05, 2003 9:59 pm
Desperately trying to debug this block but the Parse errors keep referencing line numbers backwards and forwards. The block looks fairly sound to me (although I'm still green). another set of eyes, mine are starting to go blind from staring at it.
Thanks again for all pointers.
Code: Select all
<?php
//pull fields with values assigned using passed id
$query_rsSpecs = "SELECT * FROM specs_".$category." WHERE prod_id = $products_id";
$rsSpecs = mysql_query($query_rsSpecs, $cateye2);
$row_rsSpecs = mysql_fetch_assoc($rsSpecs);
$totalFields = mysql_num_fields($rsSpecs);
//echo $row_rsSpecs['prod_id']; //making sure the query works! it does
//put field names into array to use for building simple array:
for ($i=0;$i< $totalFields;$i++){
$Fields[] = mysql_field_name($rsSpecs, $i);
}
//put recordset values into a simple array for printing
foreach ($Fields as $value){
$SpecArray[] = $row_rsSpecs['$value'];
}
//define the number of Table rows to make
$totalSpecs = (count($SpecArray);
$Rows = round($totalSpecs/8);
//make the table with the results
echo "<table width=90% border=0 cellpadding=3 cellspacing=3 bgcolor=#CC9999>";
$counter = 8;
$specset = 0;
for ($row = 1; $row< $Rows; $row++){
echo "<tr>";
for ($cells = $specset; $cells< $counter; $cells++){
if ($SpecArray[$cells] != ""){
echo "<td bgcolor=FFFFFF>".$SpecArray[$cells]."</td>";
} else if ($SpecArray[$cells] == "1"){
echo "<td align=center bgcolor=FFFFFF>•</td>";
}
}
echo "</tr>";
$specset = $specset+8;
$counter = $counter+8;
}
?>