Първо бих променил
name="s_<?php echo $colour_row[colour_name]; ?>"
и т.н. към
name="attributes[s_<?php echo $colour_row[colour_name]; ?>]"
И използвайте следния 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' );
}
Или дори по-добре
използвайте
name="attributes[xxl][color]" eg. name="attributes[xxl][<?php echo $colour_row[colour_name]; ?>]"
И
if( !empty($_POST['attributes']) ) {
foreach( $_POST['attributes'] as $sSize => $aData ) {
var_dump( $sSize );
var_dump( $aData );
}
}