Re: Loading values from a <select> tag
| From: | elias | Date: | Thu, 19 Jul 2001 21:10:43 +0000 |
| Subject: | Re: Loading values from a <select> tag | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-58655@lists.php.net to get a copy of this message | ||
<select name="my_select" multiselect>
...
</select>
then php would read as:
<?
for ($i=0;$i<count($my_select);$i++)
{
echo "Value$i={$my_select[$i]}<br>";
}
?>
"Mauricio T?Llez Jim?Nez" <mtellez@speedy.coacade.uv.mx> wrote in message
news:20010718120727.A7205@speedy.coacade.uv.mx...
> Hi all, I want to print all the text stored in a <select> tag. For
example:
>
> <select name="my_select">
> <option value=1>Hello
> <option value=2>World
> <option value=3>Again!!!
> </select>
>
> This is the final select, but is created dinamically with javascript.
> So when the sumbit button is pressed, I want that my php script output the
folowing:
>
> The number of options is: X (3 in that example)
> The options was:
>
> value=1, text=Hello
> value=2, text=World
> value=3, text=Again!!!
>
> and so on.
>
> Thanks for your help.