PHP Functions
09.01.2020
$url = $_SERVER["REQUEST_URI"];
switch ($url) {
case "/":
here is homepage
break;
case "/blog/":
here is blog
break;
...
default:
oops, nothing found
}
<?php
function writeMsg() {
echo "Hello world!";
}
writeMsg(); // call the function
?>
Compare Similarity
<?php
$a = "SEAT ALTEA XL 1.6";
$b = "altea 16 xl";
$a = strtolower($a);
$b = strtolower($b);
similar_text($a, $b, $result);
echo $result; // 57.142857142857
?>
p { color: red }
https://www.w3schools.com/php/php_oop_what_is.asp