Category: PHP

PHP  Sorting Arrays 0

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...

PHP array_change_key_case () function 0

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...

PHP array Function -array() 0

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. 1 2 3 4 5...

PHP Array Functions 0

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...

PHP Multidimensional Arrays 0

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...

PHP  Arrays 1

PHP  Arrays

PHP Arrays are used to store several values in a single variable. Example of a PHP Arrays 1 2 3 4 5 6 7 <?php $animals= array("Cow", "Goat", "Sheep"); echo "Array Values " ....

PHP Functions 1

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...

PHP  while Loops 2

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...

PHP Conditional Statements 2

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...

PHP Array Operators 2

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...