PHP array_combine() function

On

Array_combine() – use of this function you can combine two arrays for creating one array as key and value pare. Syntax-array_combine(keys, values)There is two params, first one is set of keys and second one is values. Example-<?php$keys=array(“1”,“2”,“3”);$values=array(“one”,“two”,“three”); $array=array_combine($keys,$values);print_r($array);Output//Array ( [1] => one…

Explode()

On

Explode() function is used for convert string to array type data. You can use this function for break string use with existing character in string. Such as- <?php $string=”I love my india”; $array=explode(” “,$string); print_r($array); output: array( 0=>”I”, 1=>”love”, 2=>”my”, 3=>”india” );…

in_array()

On

In_array() function return Boolean type data and this function mostly used for check value in array exist or not such as- <?php $array=array(“mango”,”apple”,”orange”); if(in_array(“apple”,$array)){ echo ‘exist’; }else{ echo ‘not exist’; } ?>