Here's my code:
<input type="Text" name="alphabet" value="abcd">
<input type="Text" name="alphabet" value="efgh">
<input type="Text" name="alphabet" value="ijkl">
In Cold Fusion, when you output these three form fields that has the same NAME attribute, you will get a 3-item list that contains the three values respectively. Like this:
<cfoutput>#form.alphabet#</cfoutput>
Will give you:
abcd,efgh,ijkl
But if you output this in PHP, you only get the last item that uses that same NAME attribute. Like this:
<?php print("$alphabet" ?>
Will give you:
ijkl
My question is, how can I get the itemed list result like it does in Cold Fusion using PHP code? I absolutely have to use the same NAME attribute for all my input text fields. I'll be generating the input fields from a loop so I don't think I can use unique NAME attributes.
Thanks!
<input type="Text" name="alphabet" value="abcd">
<input type="Text" name="alphabet" value="efgh">
<input type="Text" name="alphabet" value="ijkl">
In Cold Fusion, when you output these three form fields that has the same NAME attribute, you will get a 3-item list that contains the three values respectively. Like this:
<cfoutput>#form.alphabet#</cfoutput>
Will give you:
abcd,efgh,ijkl
But if you output this in PHP, you only get the last item that uses that same NAME attribute. Like this:
<?php print("$alphabet" ?>
Will give you:
ijkl
My question is, how can I get the itemed list result like it does in Cold Fusion using PHP code? I absolutely have to use the same NAME attribute for all my input text fields. I'll be generating the input fields from a loop so I don't think I can use unique NAME attributes.
Thanks!