1 2 3 4 5 6 7 8 9 10 11
<?php $data_array = array("the dog is hairy", "cats like treats", "my mouse is tired"); foreach ($data_array as $sentence){ if (stripos($sentence, "dog")){ echo $sentence; } } ?>
1
the dog is hairy