This file contains 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains 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 | |
$users = ['Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
$users_new = ['Ricky Andika Putra', 'Ramadani']; | |
$result = array_merge($users, $users_new); | |
print_r($result); |
This file contains 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 | |
$users = ['Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
$users_new = ['Ricky Andika Putra', 'Ramadani']; | |
$result = array_merge($users_new, $users); | |
print_r($result); |
This file contains 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 | |
$users = ['Ricky Andika Putra', 'Ramadani', 'Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
array_pop($users); | |
print_r($users); |
This file contains 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 | |
$users = ['Ricky Andika Putra', 'Ramadani', 'Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
array_shift($users); | |
$result = $users; | |
print_r($result); |
This file contains 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 | |
$input_one = ['Ricky Andika Putra', 'Ramadani', 'Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
$input_two = ['Ricky Andika Putra', 'Yandi Fitriyanto', 'Muhammad Sholeh', 'Yadi Cahyadi']; | |
array_slice($input_two, 2); | |
$result = array_merge($input_one, $input_two); | |
print_r($result); |
This file contains 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 | |
$input_one = ['Ricky Andika Putra', 'Ramadani', 'Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
$input_two = ['Ricky Andika Putra', 'Yandi Fitriyanto', 'Muhammad Sholeh', 'Yadi Cahyadi']; | |
array_shift($input_one); | |
array_pop($input_one); | |
$result = $input_one; | |
print_r($result); |
This file contains 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 | |
$input_one = ['Ricky Andika Putra', 'Ramadani', 'Asep Dadang Supriadi', 'Akmal Fuady', 'Yandi Fitriyanto']; | |
$input_two = ['Ricky Andika Putra', 'Yandi Fitriyanto', 'Muhammad Sholeh', 'Yadi Cahyadi']; | |
$result = array_count_values(array_merge($input_one, $input_two)); | |
foreach ($result as $key => $value) | |
{ | |
if($value == 2) |
This file contains 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 | |
$users = [ | |
'[email protected]' => 'Adimas Lutfi Wicaksono', | |
'[email protected]' => 'Salman Alfarisi', | |
'[email protected]' => 'Muhammad Sholeh', | |
'[email protected]' => 'Yadi Cahyadi', | |
'[email protected]' => 'Maya Maulani', | |
]; |
This file contains 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 | |
$users = [ | |
'[email protected]' => 'Adimas Lutfi Wicaksono', | |
'[email protected]' => 'Salman Alfarisi', | |
'[email protected]' => 'Muhammad Sholeh', | |
'[email protected]' => 'Yadi Cahyadi', | |
'[email protected]' => 'Maya Maulani', | |
]; |
OlderNewer