Learning & Integrating web technology and code help directory

How to add Comment Text/String in a PHP Tag

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

Example
1. Add comment in a single line.

  1. <?  
  2. mysql_connect("localhost","root","root");  
  3. mysql_select_db("db");  
  4. $strSQL = "SELECT * FROM shotdev ";  
  5. $objQuery = mysql_query($strSQL);  
  6. while($result = mysql_fetch_array($objQuery))  
  7. {  
  8. echo $result["NAME"];  
  9. echo $result["SURNAME"];  
  10. //echo $result["ADDRESS"]; // Remark single line.  
  11. }  
  12. ?>  
2. Add Comment in multiple line.

  1. <?  
  2. mysql_connect("localhost","root","root");  
  3. mysql_select_db("db");  
  4. /* Add comment in multiple line. 
  5. $strSQL = "SELECT * FROM shotdev "; 
  6. $objQuery = mysql_query($strSQL); 
  7. while($result = mysql_fetch_array($objQuery)) 
  8. { 
  9. echo $result["NAME"]; 
  10. echo $result["SURNAME"]; 
  11. echo $result["ADDRESS"]; 
  12. } 
  13. */  
  14. ?>  

No comments :

Post a Comment