Hello all
Currently I have a web fom that has 3 field in it that I want writing to a
multidimensional array.
<TR>
<TD><INPUT TYPE="text" NAME="address[]" VALUE=""></TD>
<TD WIDTH="50" ALIGN="center"><INPUT TYPE="text" NAME="address[]['state']"
VALUE="" SIZE="5" MAXLENGTH="5"></TD>
<TD COLSPAN="2"><INPUT TYPE="text" NAME="address[][]['zip']" VALUE=""></TD>
</TR>
in my page that processing this I have currently:
while(list($key,$value) = each($address)) {
if(!is_array($value)){
echo "$value ";
}
else {
while(list($key,$value1) = each($value)) {
if(!is_array($value1)){
echo "$value1 ";
}
else {
while(list($key,$value2) = each($value1)) {
echo "$value2";
}
}
}
}
echo "<BR>";
};
To read through it... I know there has to be a simpler way that I am
missing. This way will not let me sort very well from what I see either.
Thank you in advance.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php