How to echo one html line in PHP? -


dear all, want echo line in php use "echo" doesn't work.any appreciated!!

echo '<p><input type="button" name="back" value="back" onclick="window.location ='viewusers.php'" /></p>'

it's because you're using " inside want echo. need escape quotes.

this should it:

echo '<p><input type="button" name="back" value="back" onclick="window.location =\'viewusers.php\'" /></p>'; 

another option in blocks. better if doing lot of echos that. such as:

<?php if($output == "hello"):  ?>  <p><input type="button" name="back" value="back" onclick="window.location ='viewusers.php'" /></p>  <php  else: ?> <p>doesn't equal hello</p>  <?php endif; ?> 

hope helps!


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -