First Draft

First Draft of the Example Files
This commit is contained in:
RobinNixon
2020-12-10 13:21:38 +00:00
parent 77a7b57c4f
commit 0335342e00
1127 changed files with 46959 additions and 56 deletions
+18
View File
@@ -0,0 +1,18 @@
<?php
$paper = array('copier' => "Copier & Multipurpose",
'inkjet' => "Inkjet Printer",
'laser' => "Laser Printer",
'photo' => "Photographic Paper");
while (list($item, $description) = myEach($paper))
echo "$item: $description<br>";
function myEach(&$array) // Replacement for the deprecated each function
{
$key = key($array);
$result = ($key === null) ? false :
[$key, current($array), 'key', 'value' => current($array)];
next($array);
return $result;
}
?>