InterviewSolution
Saved Bookmarks
| 1. |
Which array function checks if the particular key exists in the array? |
|
Answer» In PHP arrays, the array_key_exists() FUNCTION is used when the USER wants to check if a specific key is present INSIDE an array. If the function returns with a TRUE VALUE, it is present. Here’s its syntax: array_key_exists(array_key, array_name) Also, here is an example of how it works Example$array1 = array("Orange" => 100, "Apple" => 200, "Grapes" => 300, "Cherry" => 400); key exists |
|