PHP comparison operator examples
PHP comparison operators can be confusing for beginners, here is a quick run down and example to help out. Setting variable a to 2 and b to 10 $a =…
PHP comparison operators can be confusing for beginners, here is a quick run down and example to help out. Setting variable a to 2 and b to 10 $a =…
PHP functions, a very simple way to prevent repetitive code and save you time. An example of a PHP function: function test($a, $b){ $var = $a + $b; return $var;…
In PHP if & elseif is something i was always using when in fact a simple switch would have done the job and looked cleaner. Looking at the following Switch…
PHP echo, one of the common used PHP operators. Echo is used to output a string. You can combine echo with strings and variables, Here are some examples: $age =…
Fiverr was once a place to get services or small jobs done for $5. Now you can struggle to find something worth that much on the website. Is that an…
If you want to randomise a PHP variable the following code is a great example: $vars = [‘Apple’, ‘Orange’, ‘Melon’, ‘Lemon’, ‘Lime’]; $random = $vars[mt_rand(0, count($vars) – 1)]; echo $random;…
PHP GET sends data or a value through the URL, obviously not good or used for passwords but it is good to shape that URL’s page contents. Do note that…
Domain names became a thing because its easier to remember them than an ip address, every domain name has an ip address. An example of an ip address could be:…
Whilst storing data in a json file would not be preferred over using a MYSQL database here is how to do it with a quick example and then a more…
KVM and OVZ are types of virtulisation with servers. Server hosting companies have what is called dedicated servers, very powerfull machines. These dedicated servers are split up into VPS’s which…