Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
3
Task/Hash-from-two-arrays/PHP/hash-from-two-arrays-1.php
Normal file
3
Task/Hash-from-two-arrays/PHP/hash-from-two-arrays-1.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
$keys = array('a', 'b', 'c');
|
||||
$values = array(1, 2, 3);
|
||||
$hash = array_combine($keys, $values);
|
||||
6
Task/Hash-from-two-arrays/PHP/hash-from-two-arrays-2.php
Normal file
6
Task/Hash-from-two-arrays/PHP/hash-from-two-arrays-2.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
$keys = array('a', 'b', 'c');
|
||||
$values = array(1, 2, 3);
|
||||
$hash = array();
|
||||
for ($idx = 0; $idx < count($keys); $idx++) {
|
||||
$hash[$keys[$idx]] = $values[$idx];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue