|
home | manual | reference | regression | sequence | develop | apps |
Reference - PAD functions - capitalize
App: manual - Page: callback/before
PHP
HTML
callback/before.padResult <table border=1>
<tr>
<th>Name</th>
<th>Salary</th>
<th>Bonus</th>
<th>Total</th>
</tr>
{staff callback='before.php', before}
{first}
<tr>
<td>Totals</td>
<td>{$salaryTotal | %.2f}</td>
<td>{$bonusTotal | %.2f}</td>
<td>{$totalTotal | %.2f}</td>
</tr>
{/first}
<tr align="right" bgcolor="{switch 'yellow', 'pink'}">
<td align="left">{$name | capitalize}</td>
<td>{$salary | %.2f}</td>
<td>{$bonus | %.2f}</td>
<td>{$total | %.2f}</td>
</tr>
{/staff}
</table>
Name Salary Bonus Total Totals 15000.00 1500.00 16500.00 Joe 1000.00 500.00 1500.00 Jim 2000.00 400.00 2400.00 John 3000.00 300.00 3300.00 Jack 4000.00 200.00 4200.00 Jerry 5000.00 100.00 5100.00
App: manual - Page: callback/demand
PHP
HTML
callback/demand.padResult <table border=1>
<tr>
<th>Name</th>
<th>Salary</th>
<th>Bonus</th>
<th>Total</th>
</tr>
{staff callback='demand.php', demand}
<tr align="right"
bgcolor="{switch 'yellow', 'pink'}">
<td align="left">{$name | capitalize}</td>
<td>{$salary | %.2f}</td>
<td>{$bonus | %.2f}</td>
<td>{$total | %.2f}</td>
</tr>
{/staff}
<tr>
<td>Totals</td>
<td>{$salaryTotal | %.2f}</td>
<td>{$bonusTotal | %.2f}</td>
<td>{$totalTotal | %.2f}</td>
</tr>
</table>
Name Salary Bonus Total Joe 1000.00 500.00 1500.00 Jim 2000.00 400.00 2400.00 John 3000.00 300.00 3300.00 Jack 4000.00 200.00 4200.00 Jerry 5000.00 100.00 5100.00 Totals 15000.00 1500.00 16500.00
App: check - Page: miscellaneous/eval
HTML RESULT {echo 50 * 4 * 2}
{echo 50 | * 4 | * 2}
{echo 50 | @ * 4 | @ * 2}400 400 400{echo 50 | '"' . }
{echo 50 | . '"' }
{echo 50 | '"' . @ . '"' }
{echo 50 | '"' . $$ . '"' }"50 50" "50" "50"{echo 50 | '"' . '"' }
{echo 50 | '"' . . '"' }
{echo 50 | . @ . }
{echo 50 | . }
{echo 50 | . . }"" "5050" 505050 5050 505050{set $abc = 50}{$abc | * 4}
{$abc | 4 * 4}
{$abc | * / 4}
{$abc | * 4 / 2 + 10}
{$abc | * 4 | / 2 | + 10}200 16 625 110 110{set $abc = 'abc'}{$abc | crc32}
{$abc | app:substr (1, 1)}
{$abc | pad:substr (1, 1)}
{$abc | php:substr (@, 1, 1)}891568578 b b b{set $line = 'a <test> LiNe'}{$line}
{!line}
{$line | capitalize}
{$line | upper}
{$line | lower}
{$line | url}a <test> LiNe aLiNe A <test> LiNe A <TEST> LINE a <test> line a+%3Ctest%3E+LiNe {set $nbr = 12345.678}{$nbr | %.2f}
{$nbr | %.5f}
{$nbr | %'.09d}
{$nbr | %d}
{$nbr | %e}
{$nbr | %f}
{$nbr | %g}
{$nbr | %o}12345.68 12345.67800 000012345 12345 1.234568e+4 12345.678000 12345.7 30071
|
home | manual | reference | regression | sequence | develop | apps |
(c) 2003-2025 Herbert Groot Jebbink