Re: Set Variable = Long HTML String?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all.

I'm overhauling my PHP based CMS and want to know how to set a variable 
equal to an HTML string, but without having to escape all the quotes!

Example:

$var = "<form name="events" method="POST" action="">
                        <select class="menus" name="news" 
onChange="MM_jumpMenu('parent',this,0);">
       <option selected>News Options</option>
       <option value=<? echo $this->doc_path 
?>admin/news/add/1/>Add</option>
       <option value=<? echo $this->doc_path 
?>admin/news/update/1/>Update</option>
       <option value=<? echo $this->doc_path 
?>admin/news/delete/1/>Delete</option>
      </select>
     </form>";

This will die due to all the unescaped strings, not to mention the <? echo 
$this->doc_path ?> statements.

How to pull this off?  I don't want to include the HTML snippets as they are 
"sprinkled" throughout my classes.

TIA,

--Noah


 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux