kingofkya 0 Newbie Poster

http://php.net/manual/en/function.preg-replace.php
http://phpro.org/tutorials/Introduction-to-PHP-Regex.html#1
I have been reading up on php regular expressions. Honestly I don't get it. I think i need to use the above.

Here is my problem I am reading a page via php-curl and sending it to a string variable. Now before I send the html code back to the user I need to fix the urls.

EX:
<a href="?view=events&page=1" onclick="createPopup( '?view=events&page=1', 'zmEvents', 'events' ); return( false );">1822</a>

I would like to filter and change.
?view=events&page=1
to
?view=events&page=1&extravar1=4&extravar2=4

THANKS FOR THE HELP.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.