Premièrement, je changerais
name="s_<?php echo $colour_row[colour_name]; ?>"
etc à
name="attributes[s_<?php echo $colour_row[colour_name]; ?>]"
Et utilisez le PHP suivant
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' );
}
Ou encore mieux
utiliser
name="attributes[xxl][color]" eg. name="attributes[xxl][<?php echo $colour_row[colour_name]; ?>]"
Et
if( !empty($_POST['attributes']) ) {
foreach( $_POST['attributes'] as $sSize => $aData ) {
var_dump( $sSize );
var_dump( $aData );
}
}