R: [PHP] syntax problems
| From: | n e t b r a i n | Date: | Sun, 15 Oct 2000 03:56:33 +0000 |
| Subject: | R: [PHP] syntax problems | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-20173@lists.php.net to get a copy of this message | ||
Hi Steve,
you wrote:
> In PHP3, you can only use one-dimensional arrays as form variable
> names.
Yes, I've note .. :-( a lot of my script using complex multi-dim. arrays and
developed on my local box (php4), doesn't work on remote box (php3) ...
>In PHP4, however, I've heard this CAN be done. In your case, a
> common workaround is to create variables of the form:
>
> <input type="text" name="fuseVarMust_var1_t[null]"><br>
> <input type="text" name="fuseVarMust_var2_t[null]"><br>
>
> This makes parsing form vars more work, but it is doable.
Hmmm, I've tried a lot of possible solutions, but no ones do the job except
this:
- before: I parse all the multidim. array to check how many values are
missed
- and then: if missed values are > 0, I re-parse all the multidim. array to
apply the planning action for each missed value
but I do not think this is the best way to procede ...
I think your solution could be right, but in my case I need only one single
multi-dim. array because I use the keys of it to re-create the form in case
of missed values ... I mean:
- from this ... name=fuseVarMust[var][r][t] ...
- I know that it is: (var) the fuseVarMust var, (r) required, (t) an <input
type=text ..>
and so on ... (eg. [e] is email and I've to check if it is a real mail
address, [n] is number and I've to check if it is a integer value, etc.
etc.)
Many thanks for your helps.
max