most important php function
<?php Top Most important Php function 1. empty(); // return true false $p = 'val' ; if(!empty( $p )){ // if $p is not empty echo 'variable is not empty ' ; } else { echo 'value is null' ; } 2. unset(); use for unse session or variable values unset( $a ); 3. isset(); if(isset( $a )){ echo 'value is set ' ; } else { echo 'value is not set ' ; } 4. trim () use for removes the whitespaces from the left part of the string . trim ( $a ); 5. explode () ; convert strin to array $str = "Rajeev Dhar dwivedi" ; $array = explode ( " " , $str ); print_r ( $array ); outPut : Array ( [ 0 ] => Rajeev [ 1 ] => Dhar [ 2 ] => dwivedi ) 6. implode (); convert array to string $array = array( 'Rajeev' , 'Dhar' , 'Dwived' ) ; echo implode ( " " , $array ); Output : Rajeev Dhar Dwived 7. date () function this function us