Answer Posted / binu.v.pillai
It will search a particular value in an array and if it
find that , it will return corresponding index
<?php
$fruitArray = array(0 => 'orange', 1 => 'apple', 2
=> 'mango', 3 => 'grapes');
$key = array_search('apple', $fruitArray); // $key = 1;
$key = array_search('orange', $fruitArray); // $key = 0;
?>
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
Explain about getters and setters in php?
What is difference between require_once(), require(), include()?
What is overloading in php?
Where are php configuration settings stored?
How to convert strings to upper or lower cases?
How to create a session? How to set a value in session? How to remove data from a session?
How to redirect https to http url through .htaccess?
How to find datatype of variable in php?
What is session and Cokkies . How it works . tell some thing about Session_id()
What is the meaning of ‘escaping to php’?
Do you know what is the function func_num_args() used for?
Why laravel is the best php framework in 2019?
What is the difference between null and empty?
What is the main difference between php 4 and php 5?
Does php 7 support mysql?