I have a form that sends all the data with jQuery .serialize() In the form are four arrays qty[], etc it send the form data to a sendMail page and
.serialize()
arrays qty[], etc
I prefer foreach insted of for, because you do not need to heandle the size.
if( isset( $_POST['qty'] ) ) { $qty = $_POST ['qty'] ; if( is_array( $qty ) ) { foreach ( $qty as $key => $value ) { print( $value ); } } }