web 2.0

How to add Comment Text/String in a PHP Tag

How to add Comment Text/String in a PHP Tag You can add remark/comment string or text in PHP  tag <?….?> using // or /***  ….  ***//

ShotDev Focus:
- Add a Comment to PHP Tag

Example

1. Add comment in a single line.


<?
mysql_connect("localhost","root","root");
mysql_select_db("db");
$strSQL = "SELECT * FROM shotdev ";
$objQuery = mysql_query($strSQL);
while($result = mysql_fetch_array($objQuery))
{
echo $result["NAME"];
echo $result["SURNAME"];
//echo $result["ADDRESS"]; // Remark single line.
}
?>

2. Add Comment in multiple line.


<?
mysql_connect("localhost","root","root");
mysql_select_db("db");
/* Add comment in multiple line.
$strSQL = "SELECT * FROM shotdev ";
$objQuery = mysql_query($strSQL);
while($result = mysql_fetch_array($objQuery))
{
echo $result["NAME"];
echo $result["SURNAME"];
echo $result["ADDRESS"];
}
*/
?>
1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.