php - I am trying to use substr to extract the part of the array element value with a if-else statement -
i new php , having trouble on how output this.
$employee_numbers = array( "sam jerry"=>"1849", "david flint"=>"2274", "lena vincent"=>"2532", robert vanny"=>"3471" );
i trying output substr shows name , number.
so looks
sam jerry's employee number is: 1849 --> management
thanks in advanced
you have loop through array.
$employee_numbers = array( "sam jerry"=>"1849", "david flint"=>"2274", "lena vincent"=>"2532", "robert vanny"=>"3471" ); foreach($employee_numbers $employee => $number){ echo $employee . " employee number is: " .$number . php_eol; //don't know management info }
Comments
Post a Comment