Php Arrays

Php Arrays Tutorial-Array sort in php

We can sort array in php by using built-in sort function, Now we define an array with some elements. <?php $arr=array("Kimmi","Alen","Mike","Bob"); ?> Now for sorting array we call php function sort and pass our array as its arg ...



READ MORE...


Php Arrays Tutorial-Associative array in php

Associative array Associative array is defined with strings between square backets for indexing. We can define with php array function or directly. Defining associative array with array() function: <?php $arr=array("first_name"=>"Pe ...



READ MORE...


Php Arrays Tutorial-Array in php example

An array is a variable which contains multiple values, these values are indexed by numbers and strings. We can assign values to an array in the following ways. Method 1. $city=array("Delhi","Mumbai","Chandigarh","Bangalore"); Method ...



READ MORE...