John W. Holmes wrote:


How does php know what "suitable form data" is?

I guess it could look for multiple names in the GET or POST data. But
then that would mean for every variable it goes to create, it would have
to go and look if it's already created one by that name. If it did,
erase the old one and make these two an array now.
I guess this is what Oracle 8i must do since if there is more than one element of the same name then an array is automatically made. Seems fine except that the special case of when you are expecting more than one but only one exists. It is no longer an array. Either extra code to handle it, or what I often do is add a hidden dummy element of the same name to force an array.

Rather than doing that, it can just look for [] in the name and it knows
to make that an array.

All in all, I think the [] syntax ends up with less work for me to do. So IMHO I feel PHP has it right.

Regards

Chris



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to