TEST KAYA - PHP Online
Form of PHP Sandbox
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of TEST KAYA.php
- <?php
- $a_all_f = array(
- 'US' => 0,
- 'EU' => 0,
- 'TAO' => 0
- );
- $a_common_f = $a_all_f;
- $a = array(
- 0 => array(
- 'p-sku' => 'ABC123',
- 'p-cat' => 'MANETTE',
- 'p-mapping' => array(
- 'US' => 1,
- 'EU' => 2
- )
- ),
- 1 => array(
- 'p-sku' => 'DEF456',
- 'p-cat' => 'MANETTE',
- 'p-mapping' => array(
- 'TAO' => 1
- )
- ),
- 2 => array(
- 'p-sku' => 'OOO111',
- 'p-cat' => 'ACCESSORY',
- 'p-mapping' => array(
- 'US' => 3,
- 'TAO' => 1
- )
- ),
- 3 => array(
- 'p-sku' => 'PPP222',
- 'p-cat' => 'ACCESSORY',
- 'p-mapping' => array(
- 'US' => 3,
- 'TAO' => 1
- )
- )
- );
- foreach(array_intersect_key(array_keys($a_common_f), array_keys($a[0]['p-mapping'])) as $key) {
- var_dump($key);
- }