あなたのコードは次のとおりです。
$set = array( 0 => array ( 'fname' => '',
'sname' => '',
'address' => '',
'address2' => '',
'city' => '',
'state' => 'Select State',
'zip' => '',
'county' => 'United States',
'phone' => '',
'fax' => '',
'email' => '',
'use_email' => 'on')
);
$subArray = $set[0]; // <-- key line
foreach($subArray as $k => $v) {
printf("key: %s, value: %s\n", $k, $v);
}
出力:
key: fname, value:
key: sname, value:
key: address, value:
key: address2, value:
key: city, value:
key: state, value: Select State
key: zip, value:
key: county, value: United States
key: phone, value:
key: fax, value:
key: email, value:
key: use_email, value: on
インデックス付き配列に適切にアクセスする必要があります。