Not feeling too bright!
it has to be obvious but...
I am trying as per the code example to populate a DD box from an array
the box picks up the correct number but each value reads "array" instead of the array value
Thanks
it has to be obvious but...
I am trying as per the code example to populate a DD box from an array
the box picks up the correct number but each value reads "array" instead of the array value
Code:
if ($quantity==1) { $q=array(1=>"1"); };
if ($quantity==2) { $q=array(1=>"1", 2=>"2"); };
if ($quantity==3) { $q=array(1=>"1", 2=>"2", 3=>'3'); };
echo"<form><select name='quantity' onchange='pass_val(this.value)'>";
echo"<option value=''>Select a number";
foreach($q as $key => $value)
{
echo"<option value=$q>$q";
echo'</option>';
}
echo"</select></form><div id=\"show\"></div></td></tr>
";