note 51982 added to control-structures.alternative-syntax

From: Date: Sun, 17 Apr 2005 23:09:02 +0000
Subject: note 51982 added to control-structures.alternative-syntax
Groups: php.notes 
Request: Send a blank email to php-notes+get-88136@lists.php.net to get a copy of this message
peter at randomnity dot com, please note that you were careless and forgot to escape the single-quote in your code (for the apostrophe's). echo 'X isn\'t one!'; rather than echo 'X isn't one!'; echo (($x == 1) ? 'X is one!' : 'X isn\'t one!'); rather than echo (($x == 1) ? 'X is one!' : 'X isn't one!'); (of course you could just use double quotes " " instead ;D ---- Manual Page -- http://www.php.net/manual/en/control-structures.alternative-syntax.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51982 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51982&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51982&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51982&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51982&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51982&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51982&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88136) next »