note 29447 added to language.basic-syntax.comments

From: Date: Thu, 13 Feb 2003 23:01:54 +0000
Subject: note 29447 added to language.basic-syntax.comments
Groups: php.notes 
Request: Send a blank email to php-notes+get-43899@lists.php.net to get a copy of this message
In creating debugging comments, (or any kind really) I find it useful to creating appending variables: e.g. <? $sql = "SELECT * FROM table"; mysql_query($sql,$db); $debug .= 'Block 1'; $debug .= $sql; $debug .= mysql_error(); ?> NOTE: Useful to add html to format the messages. After all the code has been documented, all one has to do is determine whether or not the message variable is printed. Less code to change all around when you want to hide the debugging messages: e.g. <? print $debug; ?> or <? //print $debug; ?> -- http://www.php.net/manual/en/language.basic-syntax.comments.php http://master.php.net/manage/user-notes.php?action=edit+29447 http://master.php.net/manage/user-notes.php?action=delete+29447 http://master.php.net/manage/user-notes.php?action=reject+29447

« previous php.notes (#43899) next »