[TxMt] PHP echo wrap

Tobias Jung newsgr at tobiasjung.net
Sat Jun 2 22:38:22 UTC 2007


At 8:45 Uhr -0700 31.05.2007, luismcdougall wrote:
>  I find my self wrapping html code very frequently.
>  It is a pain but I do not know how to work with regex,
>
>  Basically I need to use echo "" to wrap the html code and escape all of the
>  other " in it.
>
>  can someone help me?

Sorry I can't help you, but wouldn't it be better to use echo '' 
(single quotation marks) and leave the HTML " (double quatation 
marks) untouched?

Example:
Before:
<a href="some_file.php" title="this is a link">click here</a>
After:
echo '<a href="some_file.php" title="this is a link">click here</a>';

Kind regards,
Tobias Jung





More information about the textmate mailing list