Archive for April, 2007

PHP Post #2

24Apr07

Heredoc syntax, an alternative to writing PHP strings.
You begin with <<<EOD and a new line, and end it with a new line and then EOD.
$page .= <<<EOD
<p align=”center” >example</p>la
EOD;
Writing your first PHP class
<? php
//page class
class Page {
function doThis( ) { }
function doThat( ) { }
}
//end class
//Initialize the Page variable
$page = ” ;
$page = Page::doThis( );
$page [...]


PHP Post #1

23Apr07

Including one PHP script in another

PHP provides four commands that allow you to add the contents of one PHP script to another, namely include, require, include_onc, and require_once. In each case, PHP fetches the file named in the command, then executes the contents. The difference between include and require is the way they behave should [...]