How to search the key values in the array – array_search

If we have a very large array values in Indexed or Associative array, we have to search or filter the particular array value or key. Array_Search function is used to find the value. This  function used to  search an array for a value and returns the key. <?php $search =array(‘a’=>’php’,’b’=>’css’,’c’=>’html,’d’=>’dssd’,’e’=>’eeee’,f=>’fdfd’,’g’=>’dsfsd’,….); echo array_search(‘css’,$search); ?>   In the…

How to print array values in php using mysql – associative array

Associative array is array that use named keys that you assign to them. example <?php $var2 = array(‘raj’=’123′,’sekar’=>’213′,’developer’=>’545′,’desks’=>’345’); echo $var2[‘raj’]; // output is 123 echo $var2[‘sekar’]; // output is 213 echo $var2[‘developer’]; // output is 545 echo $var2[‘desks’]; // output is 345 ?> named key ‘raj’ has vlaue ‘123’; IF the named key is unknown…

Basic array concept and how to use php array and mysql

What is Array? how to use  php array? An array is a variable, which can hold more than one value at a time. php array basic function defined as array(); example < ?php $design = array(‘photoshop’,’flash’,’dreamviewer’,’html5′); echo $design[0]; //output is photoshop echo $design[1]; //output is flash ?> Three Types of Php array 1. Indexed array 2.…