Semnomic Posted September 22, 2017 Share Posted September 22, 2017 I had help on forum getting some code, i have hit a new problem when trying to insert a "&" symbol in the following line of code $rssConverted2 = preg_replace('/-([0-9]{10})/', 'pid=$1', $rssConverted1); the part "pid" above needs to be "&pid" but when i try to use &pid everything breaks. Should i be treating the "&" as some sort of special character ? Link to comment Share on other sites More sharing options...
Semnomic Posted September 22, 2017 Author Share Posted September 22, 2017 I answered my own question >> "&pid". works fine http://www.degraeve.com/reference/specialcharacters.php Im learning so was that the correct fix or is there another way to do it ? Link to comment Share on other sites More sharing options...
requinix Posted September 22, 2017 Share Posted September 22, 2017 & isn't special, no. If there was a problem then it has to do with how $rssConverted2 is being used, not the preg_replace(). Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.