Solution 1:
<?php <?php the_title_attribute(); ?><?php
This will comments only HTML portion, where as you'll find rendered PHP code in view source of webpage..
better way..
<?php ?>
Solution 2:
Solution 3:
There is the HTML way...
...and there is the PHP way...
$or = 'sections';
The difference between the 2 is that while the HTML way will still render the code on the page (can view using 'view source' in the browser), the PHP way will prevent it from being viewed by the outside world, ie. only you or other fellow programmers allowed to see the actual files will see the commented out pieces.
Solution 4:
For that functionality you would have to refactor your code.
<?php
?>
If all your code is within PHP then commenting out some of it becomes an easy thing, you would simply use PHP's commenting rules.
Solution 5:
If you want to print only the result from php functions. I hope this should help you.
<?
$var =
"'php the_permalink()' ".
"'php the_title_attribute() ' ".
"'php the_title()' ".
echo $var;
?>
or
<?
$var =
"'php the_permalink()' "."'php the_title_attribute() ' ".
"'php the_title()' ".
;
echo $var;
?>
Post a Comment for "How To Comment Out Both HTML And PHP In PHP Inside HTML?"