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 We used Multidimensional Array concept in Php?

Multidimensional Array concept in Php A multidimensional array is an array containing one or more arrays. Its is solution for to know how to handle a array with in array Example 1.Two-dimensional array 2.Three-dimensional array 1.Two-dimensional array <?php $develop= array( array(“developer”,php,html), array(“desks”,php5,html5), array(“raja”,css,ajax), array(“sekar”,jquery,drupal) ); $count= count($develop); echo “$count”;  for ($row = 0; $row <…

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…