miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
Master Class miniBB Support Forums / Master Class /   

Curly brackets format technique ( {$likeThis} ) of PHP variables - is it a standard?

Author hugh
Registered
#1 | Posted: 2 Aug 2005 11:55 
You know the technique you use of embedding variables encased in curly brackets in the template files {$likeThis} to reference functions on the index page? Is that a standard php technique? If so can you point me to the part of the manual or a tutorial that deals with it? Thanks.

Author Team
8-)
#2 | Posted: 2 Aug 2005 12:09 
It's not a standart PHP technique, but it is allowed also in PHP, to use such kind of brackets, when working with string variables. Example:

<?php

$a='a';
$b="b{$a}";
echo $b;

//produces output "ba"

echo <<<out
The first letter of alphabet is {$a}.
out;

//produces "The first letter of alphabet is a."

?>

miniBB uses special parsing function, to get these variables out.

Author hugh
Registered
#3 | Posted: 2 Aug 2005 12:18 
OK. Thanks.

Master Class miniBB Support Forums / Master Class / Curly brackets format technique ( {$likeThis} ) of PHP variables - is it a standard? Top

Your Reply Click this icon to move up to the quoted message

 Short link for this topic:

 ?
You are welcome to post anonymously, by entering a nickname with no password (if the similar Username has not been taken yet), or by leaving both fields empty. If you have a forums account, you can also sign in from this page without posting a message, or sign in and post at once.


Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.
 
miniBB Support Forums Powered by Forum Software miniBB ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Proceed with the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB