here's my two codes
Code 1
if($row2[2] == "SELECT")
{?>
<select name="selectprice<?echo $o;?>[]">
<option value="">-- None --</option>
<?for($i=3; $i<63; $i++)
{if($row2[$i] == ""){}else{?>
<option value="<?$i++; $price = $row2[$i]; $price = number_format($price, 2, '.', ''); $i--; $price = "$price,$row2[0],$row2[$i]"; $i++; echo $price; $i--;?>"><?echo $row2[$i]?><?$i++; echo "<font face=\"arial, helvetica, verdana\" size=\"1\" color=\"#000000\">[add ".$row2[$i]."]"; $i--;?></option>
<?$i++;}}?>
</select>
<?
}
Code 2
if($selectprice)
{
$countselectprice = @count($selectprice);
for($i=0; $i<$countselectprice; $i++)
{
$explode = @explode(",", $selectprice[$i]);
$itemPrice = ($itemPrice + $explode[0]);
$options = "$options,$explode[1]";
$optionselect = "$optionselect,$explode[2]";
}
}
in the first code I name my select box "selectprice1[]" or whatever the value of $o is at the time.
When I intercept the code in "code 2" how do I get it to read it as $selectprice1???
I remember seeing something on a post along time ago where you have to right it like...
if(${.'selectprice$i'.}
but I can't remember how to do it exacly.
Please help if I have made any sense here 😉