w3-tools.com - Free Webmaster Tools and Resources
 
w3-tools.com - Free Webmaster Tools and Resources
 Free Webmaster Tools and Resources

 



Smarty Manual

This manual is provided as a courtesy. It is not an official source. Please check smarty.php.net for updated information.

Smarty Manual

Smarty Manual

{php}

{php} tags allow php to be embedded directly into the template. They will not be escaped, regardless of the $php_handling setting. This is for advanced users only, not normally needed.

Example 7-17. {php} tags

{php}
   // including a php script directly
   // from the template.
   include('/path/to/display_weather.php');
{/php}

Technical Note: To access PHP variables in {php} blocks you may need to use the PHP global keyword.

Example 7-18. {php} tags with global

{php}
   global $foo, $bar;
   if($foo == $bar){
     // do something
   }
{/php}

See also $php_handling, {include_php}, {include} and Componentized Templates.

Newsletter

Join to our newsletter and receive news and updates about our site.
Your name: 
E-mail address: 
Action: 
 

Hosted by

Search

Google
Web w3-tools.com

Links

  What is my IP? Find your IP address!     Valid XHTML 1.0 Transitional  
Copyright © 2006. by w3-tools.com. All rights reserved