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
Post a Comment