simplate (0.4.2) | 2010-01-13 01:02 |
PHP から 割り当てられた 変数は、 (php と同様に) 先頭にドル記号 ($) をつける事で参照できます。
php script
一方、index.tpl の内容はこのようになります。
出力は次のようになります。
PHP から割り当てられた連想配列を参照することもできます。 この場合は、'.' (ピリオド) 記号の後にキーを指定します。
一方、index.tpl の内容はこのようになります。
出力は次のようになります。
配列に対してインデックスでアクセスすることもできます。
一方、index.tpl の内容はこのようになります。
出力は次のようになります。
PHP から割り当てられた オブジェクト のプロパティにアクセスするには、-> 記号の後にプロパティ名を指定します。
出力は次のようになります。