Add all the A tasks
This commit is contained in:
parent
2dd7375f96
commit
051504d65b
1608 changed files with 18584 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
$pairs = array( "hello" => 1,
|
||||
"world" => 2,
|
||||
"!" => 3 );
|
||||
|
||||
// iterate over key-value pairs
|
||||
foreach($pairs as $k => $v) {
|
||||
echo "(k,v) = ($k, $v)\n";
|
||||
}
|
||||
|
||||
// iterate over keys
|
||||
foreach(array_keys($pairs) as $key) {
|
||||
echo "key = $key, value = $pairs[$key]\n";
|
||||
}
|
||||
|
||||
// iterate over values
|
||||
foreach($pairs as $value) {
|
||||
echo "values = $value\n";
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue