Ten eerste zou ik veranderen
name="s_<?php echo $colour_row[colour_name]; ?>"
enz. naar
name="attributes[s_<?php echo $colour_row[colour_name]; ?>]"
En gebruik de volgende PHP
if( !empty($_POST['attributes']) ) {
foreach( $_POST['attributes'] as $sKey => $iQty ) {
var_dump( $sKey );
var_dump( $iQty );
}
} else {
die( 'Just for debuging. attributes-array was empty' );
}
Of nog beter
gebruik
name="attributes[xxl][color]" eg. name="attributes[xxl][<?php echo $colour_row[colour_name]; ?>]"
En
if( !empty($_POST['attributes']) ) {
foreach( $_POST['attributes'] as $sSize => $aData ) {
var_dump( $sSize );
var_dump( $aData );
}
}