unable to echo a dropdown box with php variables help!
Posted: Thu Dec 14, 2006 6:24 pm
Ok, im trying to echo the contents of the array '$inv' into a dropdown box... (an inventory system)
however it only shows $inv[$key] in the dropdown box, how can I get it to recognize the $inv variable?
code:
thats currently what I have, can anyone help?
however it only shows $inv[$key] in the dropdown box, how can I get it to recognize the $inv variable?
code:
Code: Select all
?>
<form method="post" action="HomePIG.php">
<select name='inv'>
<php
foreach ($inv as $key => $shw)
{
echo '<option value=$inv[$key]>$inv$[key]</option>';
}
?>
</select>
</form>