Foreach Code / HTML Options
Posted: Wed Sep 03, 2014 3:00 am
Hello,
can somebody show me how to make a foreach code to generate options based on an array.
My array is like this
I would like it to generate this <option value="1">1 shirt</option> etc.
thanks a lot
can somebody show me how to make a foreach code to generate options based on an array.
My array is like this
Code: Select all
$shirtsqty = array('1'=>"1 shirt",
'2'=>"2 shirts",
'3'=>"3 shirts",
'4'=>"4 shirts",
'5'=>"5 shirts");
thanks a lot