[ create a new paste ] login | about

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

PHP, pasted on Jun 1:
1
2
3
4
5
6
7
8
9
<?php

  $needle = array(1,1);
  $haystack1 = array(0,1,0,0,0,1,1,0,1,0);
  $haystack2 = array(0,0,0,0,1,0,1,0,0,1);

  if ( strpos( join($haystack1), join($needle) ) >= 0 ) {
    echo "Items found";
  }


Output:
1
Items found


Create a new paste based on this one


Comments: