<?php $array = ['James', 'Doe', 'John']; if (in_array('James', $array)) { echo "James is in the array"; }