News Feed
Sections
News Archive


Community Events
php|tek 2008 PHP Conference



feed this:

Lars Strojny's Blog:
NOWDOC + double quotes = HEREDOC
0 comments :: posted Tuesday April 15, 2008 @ 10:25:09
voice your opinion now!

Lars Strojny has posted about a the new element that's been introduced in the PHP 5.3 branch - NOWDOC:

PHP 5.3 introduces a new syntax element, NOWDOC. If you know HEREDOC, NOWDOC is easy to understand: it is in fact HEREDOC taken literally. Whily variables are expanded in HEREDOC, in NOWDOC they are not.

NOWDOC is basically a HEREDOC except for one thing - no parsing is done inside of it, making it good for echoing out PHP code (that would otherwise need to be escaped all over).

tagged with: heredoc nowdoc parse block content


PHPRiot.com:
Creating Custom Block Tags in Smarty
0 comments :: posted Monday February 04, 2008 @ 07:56:00
voice your opinion now!

On the {H{Riot.com site today, there's a new tutorial talking about how to customize your site's Smarty templates a bit more using external plug-ins, specifically one for making those "code block" sections seen all over the web.

We will first learn how block plug-ins can be used in your templates, and then learn how to create our own. Once we know how to create a block plug-in, we will cover a practical example that will show you how block plug-ins can effectively be used in your own web sites.

The tutorial assumes that you already have Smarty installed and that you're familiar enough with it to know how to work with the plug-in system right away. They include some samples of how it can be used (a default block, formatting it with HTML) and, of course, how to integrate this (PHP code and all) into your template and push your content into it.

tagged with: custom block tag smarty plugin example code tutorial


framework package mysql pecl releases release code security ajax job cakephp zendframework zend database PHP5 application book developer PEAR conference

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework