Skip to content

See if Value Exists in PHP Array

Last updated on December 23, 2015

in_array() is the function to Check if a value exists in an array using PHP. Here is an example of how it is used: –

$array = array("IN", "US", "UK", "AUS");
if (in_array("IN", $array)) {
echo "

IN is in array! "; }

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments