PAD - PHP Application Driver


home | manual | reference | regression | sequence | develop | apps


Pages/parse

PHP
HTML
pages/parse.pad
Result
{block}

<p>
PAD parses on the fly (on demand) it searches for the first <b>}</b>, then it takes the first <b>{</b> before it, and analyses it to see if it is a PAD tag or a PAD variable.
</p>

<p>
In below example, the {source}{$myVar}{/source} part is parsed first and executed.
</p>

{example 'miscellaneous/parse/1', skipResult, skipPhp, skipHeader}

<p>
Lets assume {source}{$myVar}{/source} has the value ABC, then the result will be below, and now the {tag 'pad'} tag will be processed.
</p>

{example 'miscellaneous/parse/2', skipResult, skipPhp, skipHeader}

<p>
If you do not put quotes around {source}{$myVar}{/source} then below will be executed, and PAD will give the error that the constant ABC does not exists
</p>

{example 'miscellaneous/parse/3', skipResult, skipPhp, skipHeader}


{/block}

PAD parses on the fly (on demand) it searches for the first }, then it takes the first { before it, and analyses it to see if it is a PAD tag or a PAD variable.

In below example, the {$myVar} part is parsed first and executed.

{pad myOption='{$myVar}', $xyz=789}
....
{/pad}

Lets assume {$myVar} has the value ABC, then the result will be below, and now the {pad} tag will be processed.

{pad myOption='ABC', $xyz=789}
....
{/pad}

If you do not put quotes around {$myVar} then below will be executed, and PAD will give the error that the constant ABC does not exists

{pad myOption=ABC, $xyz=789}
....
{/pad}



home | manual | reference | regression | sequence | develop | apps

(c) 2003-2025 Herbert Groot Jebbink