Search a $haystack for an array of $needles

So I was trawling the web after I discovered there wasn't a standard PHP function performed the same function as strpos() but allowed you to specify an array as a $needle. Found this neat little function on webmastertalkforums.com that does just that.

This PHP Function works like strpos() but allows you to submit an array as the needle. The function then loops through each value in the array and determines if the $haystack has contains any of the values in the array.
The PHP
<?php
/* strpos that takes an array of values to match against a string
 * note the stupid argument order (to match strpos)
 */
function strpos_arr($haystack, $needle) {
    if(!is_array($needle)) $needle = array($needle);
    foreach($needle as $what) {
        if(($pos = strpos($haystack, $what))!==false) return $pos;
    }
    return false;
}
?>
Example Usage
$needle = array('something','nothing');
$haystack = "This is something";
echo strpos_array($haystack, $need); // Will echo True

$haystack = "This isn't anything";
echo strpos_array($haystack, $need); // Will echo False 
Read the original post

Foo Fighters – White Limo – [The Prodigy remix]

my remix of 'white limo'/ foo fighters that dave asked me to do , heres the instrumental for yo ass aswell ! Master H
If you no longer go for a gap, that exists, then you are no longer a racing driver.
—Ayrton Senna

Archives

2012
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2011
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
2010
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec