RE: [PHP4BETA] heredoc and slashes

From: Date: Sat, 08 Jan 2000 01:22:25 +0000
Subject: RE: [PHP4BETA] heredoc and slashes
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-8981@lists.php.net to get a copy of this message
The reason for that is this: Lets say that you want the output: this is not a $variable but you would get: this is not a so, you get to escape the '$' but lets say you want to display the string: this is not a \$variable than you would need to escape both characters. so, to make 2 backslashes appear, you need 4 backslashes in a row. it is kinda annoying, but there is no better way. Hope this helped, Jeff Davis. -----Original Message----- From: Stefano Bagnara [mailto:bago@datasail.net] Sent: Friday, January 07, 2000 7:09 AM To: php4beta@lists.php.net Subject: [PHP4BETA] heredoc and slashes <?php $str =<<<EOD a string with \\ two slashes in it.. EOD; print($str); ?> output: a string with \ two slashes in it.. is this correct?? why i need to escape slashes?? -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net

« previous php.version4 (#8981) next »