note 94159 modified in language.types.string by thiago

From: Date: Tue, 20 Oct 2009 12:46:05 +0000
Subject: note 94159 modified in language.types.string by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-161900@lists.php.net to get a copy of this message
If you want a parsed variable surrounded by curly braces, just double the curly braces: <?php $foo = "bar"; echo "{{$foo}}"; ?> will just show {bar}. The { is special only if followed by the $ sign and matches one }. In this case, that applies only to the inner braces. The outer ones are not escaped and pass through directly. --was-- If you want a parsed variable surrounded by curly braces, don't jump through the hoops strata_ranger at hotmail dot com suggested. Instead, just double the curly braces: <?php $foo = "bar"; echo "{{$foo}}"; ?> will just show {bar}. The { is special only if followed by the $ sign and matches one }. In this case, that applies only to the inner braces. The outer ones are not escaped and pass through directly. http://php.net/manual/en/language.types.string.php

« previous php.notes (#161900) next »