Forum Moderators: coopster
Could someone help me craft a regex to use in a preg_replace()?
What I need is a regex to escape all quotes that lie between every .?> and <? in a page. So, given:
<? ..?>
<form method="post">
<input type="text" name="text" />
<input type="submit" value="submit" />
</form>
<? ..?>
I need to replace that with:
<? ..?>
<form method=\"post\">
<input type=\"text\" name=\"text\" />
<input type=\"submit\" value=\"submit\" />
</form>
<? ..?>
Any help would be greatly appreciated!
Take a look at: [us2.php.net...]
I'm not sure if you HAVE to use the <? ..?> but it seems a little hackish. This is possibly the correct way to accomplish what
you're trying to do.
Be sure that first and last EODs starts and ends on a new line.
if you are only looking about solving a quote problem that should do it.