Skip to content

Instantly share code, notes, and snippets.

@anggadarkprince
Created August 23, 2018 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anggadarkprince/07377278adfb050eefae29c9a7bcf8b3 to your computer and use it in GitHub Desktop.
Save anggadarkprince/07377278adfb050eefae29c9a7bcf8b3 to your computer and use it in GitHub Desktop.
TCI Structure Data
<?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
<?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