note 23586 deleted from function.eval by didou
| From: | didou@php.net | Date: | Sat, 17 May 2003 14:42:52 +0000 |
| Subject: | note 23586 deleted from function.eval by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-48147@lists.php.net to get a copy of this message | ||
Note Submitter: arthur@do.not.spam.batman.is
I used to use this p0 to p50 method myself, using eval or $$ to evaluate the results. Then I
realized that a set of form field with a common array name like p[] end up begin an array in php:
<form>
Field one: <input name="p[]">
Field two: <input name="p[]">
Field three: <input name="p[]">
</form>
...
<?
echo "Field one: $p[0]";
echo "Field two: $p[1]";
echo "Field three: $p[2]";
?>
This can be very useful, for example when using <select multiple> or a set of checkboxes.