PHP  Sorting Arrays

Values contained  in arrays can be sorted in different forms,either numerically or in alphabetical order.In numerical,they can be sort arrays in  ascending or descending. Functions used in sort arrays sort() function-  can be used in sorting  arrays in ascending order rsort ()  function -can be used in…

PHP array_change_key_case () function

PHP array_change_key_case() function  is used  to change keys contained in array from one case to another i.e from Lowercase  to uppercase or from Uppercase to lowercase. Below examples shows how to change keys to uppercase PHP array_change_key_case function Syntax array_change_key_case(arrayname,casetype); Parameters: Array-The function requireds array defined…

PHP array Function -array()

PHP array  Function is used to create new arrays. For  example: Below example create array called animals and assign its 3 elements.All the elements are printed using  echo function. As  i stated earlier in my post about PHP Arrays,there are three types of arrays.Namely Indexed…

PHP Array Functions

Earlier we defined array as a variable that has capability of holding more than one value.There are different types of arrays-:Indexed Arrays-These are arrays with numeric index Associative Arrays-Arrays that have named key  Multidimensional arrays–are special types of arrays that contain 1 or more arrays.…

PHP Multidimensional Arrays

PHP  Multidimensional Arrays

PHP Multidimensional Arrays values are stored using more than one key unlike other arrays that use only one key. PHP Multidimensional Arrays PHP  Multidimensional Arrays are special type of arrays that have  atleast one array or more inside them i.e A two dimensional array  needs…

PHP  Arrays

PHP Arrays are used to store several values in a single variable. Example of a PHP Arrays Array is a variable that has the capability of holding more than one value at the same time. Above example is a array that holds different animals.If we…

PHP Functions

PHP Functions give php language the real power.PHP has more than a 1000 functions that are built in. PHP Functions Defined by the User Apart from PHP functions that comes with this language,programmers can create their own functions that can be executed several in the…

PHP  while Loops

PHP while Loops are repeatedly executed when the condition returns true.The code will loop out when the condition returns false. PHP while Loops Usually,as a programmer you will need to execute a  certain code block severally.Without loops,one will be required to copy paste the same…

PHP Conditional Statements

PHP Conditional Statements are used to do different actions.Different conditions can be perfomed using different statements. PHP Conditional Statements Generally,programmers write code  that perform different actions using different conditions. PHP has below conditional Statements      1.switch statement –used to select a block of code…

PHP Array Operators

PHP Operators

PHP Operators are used to do operations that affect variable values. PHP Operators PHP Operators are  grouped into severa categories. 1.Array operators 2.String operators 3.Logical Operators 4.Decrement/Increment operators 5.Comparison operators 6.Assingment operators 7.Arithmetic operators SEE ALSO: PHP  Constants PHP Array Operators These operators are used to…