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

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

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -