Mapper99
06-04-2008, 03:24 PM
I can't seem to get a PHP case insensitive search to work using an XPATH query.
This code works (case sensitive):
$lats = $users->xpath("/users/user[contains(.,'$fullname')]/lat");
This code does not work:
$lats = $users->xpath("/users/user[contains(translate(.,'abcdefghijklmnopqrstuvwxyz'," + " 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),'$fullname')]/lat");
Any ideas? Is this the correct approach?
Thanks in advance,
Mapper
This code works (case sensitive):
$lats = $users->xpath("/users/user[contains(.,'$fullname')]/lat");
This code does not work:
$lats = $users->xpath("/users/user[contains(translate(.,'abcdefghijklmnopqrstuvwxyz'," + " 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'),'$fullname')]/lat");
Any ideas? Is this the correct approach?
Thanks in advance,
Mapper