Including other code snippets

{{include:snippet/example}} See the code for the example.html file

Calling PHP Built in Functions & User Defined Functions:

Getting the server variable for document root

The document root is located at {_SERVER["DOCUMENT_ROOT"]}

Parsing a normal variable

His name is {name}

Parsing an object variable

"Jim", "email" => "jim@somewhere.com"]; $pets = ["dog", "cat"]; ?>

His name is {user->name} and his email address is {user->email}. He has a {pets[0]} and a {pets[1]}.

Calling PHP Built in Functions & User Defined Functions:

Getting the PHP Version

Version {{call:phpversion}}

Doing a substr of "My name is somename"

The sub string is {{call:substr?"My name is somename",10,10}}

Calling Classes defined under project:

Calling testClass method getDisplay

{{testClass:getDisplay?"Jim",100}}

Recursion, Looping over Data:

Getting a list of users

Getting a list of names from the test class

Getting a list of users with pets

Getting a list of names & pets from the test class

A list of admin users with pictures