[ create a new paste ] login | about

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

PHP, pasted on Oct 9:
1
2
3
4
5
6
7
8
9
<?php
$data_array = array("the dog is hairy", "cats like treats", "my mouse is tired");

foreach ($data_array as $val) {
  if (strstr($val, 'dog')) {
    echo $val;
  }
}
?>


Output:
1
the dog is hairy


Create a new paste based on this one


Comments: