Searching an expression using regular expressions.
Posted: Mon Oct 22, 2007 6:59 am
Hey there,
I am trying to find the element of an array which has .php in
The problem is $cj = nothing. Im guessing this is because it looks for an exact match.
How can I use regular expressions to search for the element with anything .php .
Chris
I am trying to find the element of an array which has .php in
Code: Select all
$chars =split("/", $_SERVER['PHP_SELF'], 5);
$cj = in_array(".php", $chars);
print_r($chars);
echo $cj;How can I use regular expressions to search for the element with anything .php .
Chris