Created
August 23, 2018 01:48
-
-
Save anggadarkprince/07377278adfb050eefae29c9a7bcf8b3 to your computer and use it in GitHub Desktop.
TCI Structure Data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = [ | |
[ | |
'no_transaction' => '001', | |
'items' => [ | |
['name' => 'Milk', 'total' => 4], | |
['name' => 'Coffee', 'total' => 2], | |
] | |
], | |
[ | |
'no_transaction' => '002', | |
'items' => [ | |
['name' => 'Tea', 'total' => 7], | |
['name' => 'Sugar', 'total' => 1], | |
['name' => 'Coffee', 'total' => 5], | |
] | |
] | |
]; | |
// Output: | |
// | |
// 001 | |
// Milk (4) | |
// Coffee (2) | |
// 002 | |
// Tea (7) | |
// Coffee (5) | |
// write your solution below this line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$customers = ['rio', 'ari', 'yuki']; | |
$contacts = [ | |
'ari' => '84684646', | |
'dewi' => '47464524', | |
'beni' => '4734526', | |
'rio' => '4774525', | |
'fitri' => '74563734', | |
] | |
// Output: | |
// | |
// rio: 4774525 | |
// ari: 84684646 | |
// yuki: no contact | |
// write your solution below this line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment