PHP if matching conditions statements

Here are some examples to filter through strings in PHP to meet conditions. PHP functions used during this tutorial are: substr, is_numeric, preg_replace, str_replace and trim. Assume possible strings could…

Sorting array’s in PHP

How to sort arrays and associative arrays in ascending and descending sort. To sort an array ascending use sort: $array = array(“Car”, “Animal”, “Book”); sort($array);//(“Animal”, “Book”, “Car”) Or with values…