what's difference between in_array() and array_search() in php?

in_array() checks if the specified value exits in the array,while array_search() searches an array for a given value and returns the key
example of in_array():
<?
$a1=array("a"=>"one","b"=>"two");
if(in_array("one",$a1))
{
echo "exit";
}else
{
echo "not exist";
}
//example of array_search():
 $a1=array("a"=>"one","b"=>"two");
echo array_search("one",$a1);
it returns: a
?>