[ create a new paste ] login | about

Link: http://codepad.org/BpYE0lHf    [ raw code | output | fork ]

PHP, pasted on Oct 9:
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;
    }
}

?>


Output:
1
the dog is hairy


Create a new paste based on this one


Comments: