<?php
$q = 'ann@x.com'; $c = 'Paris, TX'; $t = ' {php:getcwd} '; $people = [ [ 'name' => 'Ann', 'email' => 'ann@x.com', 'city' => 'Paris, TX' ], [ 'name' => 'Bob', 'email' => 'bob@x.com', 'city' => 'Rome' ] ];
?>
|
1[{people where='$email eq {$q}'}{$name}{/people}] 2[{people where='$email eq "{$q}"'}{$name}{/people}] 3[{people where='$city eq {$c}'}{$name}{/people}] 4[{if '{$c}' eq 'Paris, TX'}y{else}n{/if}] 5[{if {$c} eq 'Paris, TX'}y{else}n{/if}] 6[{case '{$q}'}{when 'ann@x.com'}hit{else}miss{/case}] 7[{echo php:str_contains('{$c}', ',') ? 'has' : 'no'}] 8[{echo '{$c}' . '' | php:strlen}] 9[{echo '{$c}' | php:strtoupper}] 10[{if '{$c}' . '!' eq 'Paris, TX!'}y{else}n{/if}] 11[{echo php:trim('{$t}')}] 12[{echo php:explode(' ', '{$t}') | php:implode('/', @)}]
|
|