//test of 10 $d = array(5, 2, 3, 4, 1, 0); convertArrayToBead($d); echo "<br/>11---------------------------------------------<br/>"; //test of 11 $array1 = array(array(77, 87), array(23, 45)); $array2 = array("w3resource", "com"); print_r(mergeTwoArraysByIndex($array1, $array2)); echo "<br/>12---------------------------------------------<br/>"; //test of 12 $Color5 = array('A' => 'Blue', 'B' => 'Green', 'c' => 'Red'); print_r(changeValueUpperCase($Color5)); print_r(changeValueLowerCase($Color5)); echo "<br/>13---------------------------------------------<br/>"; //13- divisible(200, 250); echo "<br/>14---------------------------------------------<br/>"; //14- $s = array("abcd", "abc", "de", "hjjj", "g", "wer"); getLongestString($s); echo '<br/>'; getShortestString($s); echo "<br/>15---------------------------------------------<br/><br/>"; //15- $a = randRange(11, 20); foreach ($a as $value) { echo $value . "<br/>"; } echo "<br/>16---------------------------------------------<br/>"; //16- $Color6 = array('A' => 'Blue', 'B' => 'Green', 'c' => 'Red');
} </style> </head> <body> <div class="text"> <?php $a = 6; //$s = "Hallo draai mij om"; ?> <h3><?php reverse($a); ?> </h3><?php celFahren($a); divisible($a); if (divisible($a)) { echo "Ja " . $a . " is deel baar door 3"; } else { echo "Nee je kan " . $a . " niet door 3 delen"; } function celFahren($c) { $f = $c * 9 / 5 + 32; echo "°" . $c . " Celcius = °" . $f . " Fahrenheit<br>"; } function divisible($d) { if ($d % 3 == 0) { return true; } }
function divisible($x, $y) { if ($x == $y) { return; } elseif ($x % 4 == 0) { echo "<br/>" . $x; return divisible(++$x, $y); } else { return divisible(++$x, $y); } }