[nycphp-talk] T_ARRAY error but have no idea why
Phil Powell
soazine at erols.com
Mon Sep 22 19:16:23 EDT 2003
The following code:
$kounter = 0; $fsArray = array('farge', 'storrelse');
for ($i = 0; $i < sizeof($fsArray); $i++) {
// POPULATE CONTENT FOR BOTH FARGE AND STØRRELSE DROPDOWNS NOW ASSOCIATED ACCORDING TO PRODUKT ID
$label = $fsArray[$i];
${$label}Array = array();
$sql = 'SELECT s.nnet_produkt_' . $label . '_navn ' .
'FROM nnet_produkt p, nnet_produkt_' . $label . '_assoc q, ' .
' nnet_produkt_' . $label . ' r ' .
'WHERE p.nnet_produkt_id = q.nnet_produkt_id ' .
' AND p.nnet_produkt_id = ' . $row['nnet_produkt_id'] .
' AND q.nnet_produkt_' . $label . '_id = r.nnet_produkt_' . $label . '_id';
$dropdownQuery = mysql_query($sql) or die('Could not perform dropdown query: ' . mysql_error());
while ($dropdownRow = mysql_fetch_row($dropdownQuery))
array_push(${$label}Array, $dropdownRow[0]);
} // END OF FOR LOOP FOR $fsArray
produces the following error:
Parse error: parse error, unexpected T_ARRAY in /home/nordicnet.no/membersites/vis_varegruppen.php on line 133
Line 133 is:
${$label}Array = array();
I'm lost as usual. Help!
Thanx
Phil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20030922/e167e4a2/attachment.html>
More information about the talk
mailing list