how can i passed array into a function in php [closed]

function search($arrTry)
{ 
  echo $arrTry["name"];
  echo '<br>';
  echo $arrTry["lname"];
}

  $arrTry = array("name"=>"Keydi", "lname"=>"Paul"); 


// To call this function
     search($arrTry);

Browse More Popular Posts

Leave a Comment