PHP: Execute php code inside "php echo" -


i've got php code created echo:

<?php    code...   $line = "hello world";   echo "<li>php if (!empty($line)) { echo $line; }</li>"; ?> 

unfortunately <li> not show hello world. can see here: http://codepad.org/qfcsindy

your syntax wrong. check this

<?php   code...  ?> <li><?php echo 'hello world'; ?>  <?php ?> 

or just

<?php   code...  echo "<li>hello world</li>"; ?> 

Comments

Popular posts from this blog

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

html - Outlook 2010 Anchor (url/address/link) -

android - How to create dynamically Fragment pager adapter -