Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is array_search() in php?

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


Please Help Members By Posting Answers For Below Questions

Why does sql injection happen?

996


what is mean by portal

2030


How break and continue while loop in php?

939


How to include variables in double-quoted strings in php?

957


What are the differences between PHP3 and PHP4 and PHP5? what is the current stable version of PHP?

1106


Is age interval or ordinal data?

971


Tell me what are the functions to be used to get the image's properties (size, width and height)?

1033


what is the current salary package in India for a PHP programmer who has 1.5 years experience

2987


Which php function will attach one file to another?

976


How do I find environment variables?

990


Explain what is the use of "echo" in php?

1012


Explain what are psrs?

941


Tell me how can we display information of a variable and readable by human with php?

1027


Explain the difference between unlink() and unset()?

945


Tell me which programming language does php resemble to?

923