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
Why does sql injection happen?
what is mean by portal
How break and continue while loop in php?
How to include variables in double-quoted strings in php?
What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?
Is age interval or ordinal data?
Tell me what are the functions to be used to get the image's properties (size, width and height)?
what is the current salary package in India for a PHP programmer who has 1.5 years experience
Which php function will attach one file to another?
How do I find environment variables?
Explain what is the use of "echo" in php?
Explain what are psrs?
Tell me how can we display information of a variable and readable by human with php?
Explain the difference between unlink() and unset()?
Tell me which programming language does php resemble to?