Jump to content

regex question how to replace "&" special character?


Semnomic

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.