I have tried many different combinations in order to get this to function the results vary from "no results" to simply producing various errors. What I am trying to do is search for all specified links on a web page containing part words or numbers... For example this works :
$nodes = $xpath->query('//a[contains(@href, \'sweet\')]/@href');
And searches for all hrefs that contain "sweet" in any part of the href... problem it's case sensitive and almost all of the URL's contain PHP query strings with usernames that allow for mixed upper and lower case in the string, so this is one of my many failed attempts and making the query case insensitive :
$nodes = $xpath->query('//a[contains(translate(\'ABCDEFGHIJKLMNOPQRSTUVWXYZ\',\'abcdefghijklmnopqrstuvwxyz\'),\'@href\', \'sweet\')]/@href');
I think I am on the right track but have the syntax wrong ?