mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-05 10:54:27 +02:00
Added <![CDATA[ tags, <br> becomes <br />
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
<!-- $Revision$ -->
|
<!-- $Revision$ -->
|
||||||
<!-- EN-Revision: 1.1 Maintainer: nobody Status: partial -->
|
<!-- EN-Revision: 1.1 Maintainer: gerald Status: ready -->
|
||||||
<sect1 id="language.assigned.variables">
|
<sect1 id="language.assigned.variables">
|
||||||
<title>Variables assign<67>es depuis PHP</title>
|
<title>Variables assign<67>es depuis PHP</title>
|
||||||
<para>
|
<para>
|
||||||
@@ -67,7 +67,7 @@ $smarty->display('index.tpl');
|
|||||||
]]>
|
]]>
|
||||||
</programlisting>
|
</programlisting>
|
||||||
<para>
|
<para>
|
||||||
Cela va afficher :
|
Ce qui donne en sortie :
|
||||||
</para>
|
</para>
|
||||||
<screen>
|
<screen>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
@@ -88,31 +88,42 @@ zaphod@slartibartfast.com<br />
|
|||||||
</para>
|
</para>
|
||||||
<example>
|
<example>
|
||||||
<title>Acc<EFBFBD>s aux tableaux gr<67>ce <20> l'index</title>
|
<title>Acc<EFBFBD>s aux tableaux gr<67>ce <20> l'index</title>
|
||||||
<programlisting>
|
<programlisting role="php">
|
||||||
index.php:
|
<![CDATA[
|
||||||
|
<?php
|
||||||
$smarty = new Smarty;
|
$smarty = new Smarty;
|
||||||
$smarty->assign('Contacts',
|
$smarty->assign('Contacts',
|
||||||
array('555-222-9876',
|
array('555-222-9876',
|
||||||
'zaphod@slartibartfast.com',
|
'zaphod@slartibartfast.com',
|
||||||
array('555-444-3333',
|
array('555-444-3333',
|
||||||
'555-111-1234')));
|
'555-111-1234')));
|
||||||
$smarty->display('index.tpl');
|
$smarty->display('index.tpl');
|
||||||
|
?>
|
||||||
index.tpl:
|
]]>
|
||||||
|
</programlisting>
|
||||||
{$Contacts[0]}<br>
|
<para>
|
||||||
{$Contacts[1]}<br>
|
Ou index.tpl est :
|
||||||
{* you can print arrays of arrays as well *}
|
</para>
|
||||||
{$Contacts[2][0]}<br>
|
<programlisting>
|
||||||
{$Contacts[2][1]}<br>
|
<![CDATA[
|
||||||
|
{$Contacts[0]}<br />
|
||||||
SORTIE:
|
{$Contacts[1]}<br />
|
||||||
|
{* Vous pouvez <20>galement afficher des tableaux *}
|
||||||
555-222-9876<br>
|
{$Contacts[2][0]}<br />
|
||||||
zaphod@slartibartfast.com<br>
|
{$Contacts[2][1]}<br />
|
||||||
555-444-3333<br>
|
]]>
|
||||||
555-111-1234<br></programlisting>
|
</programlisting>
|
||||||
|
<para>
|
||||||
|
ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
|
555-222-9876<br />
|
||||||
|
zaphod@slartibartfast.com<br />
|
||||||
|
555-444-3333<br />
|
||||||
|
555-111-1234<br />
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
<sect2 id="language.variables.objects">
|
<sect2 id="language.variables.objects">
|
||||||
@@ -124,13 +135,20 @@ zaphod@slartibartfast.com<br>
|
|||||||
<example>
|
<example>
|
||||||
<title>acc<EFBFBD>der aux attributs des objets</title>
|
<title>acc<EFBFBD>der aux attributs des objets</title>
|
||||||
<programlisting>
|
<programlisting>
|
||||||
nom: {$person->name}<br>
|
<![CDATA[
|
||||||
email: {$person->email}<br>
|
nom: {$person->name}<br />
|
||||||
|
email: {$person->email}<br />
|
||||||
SORTIE:
|
]]>
|
||||||
|
</programlisting>
|
||||||
nom: Zaphod Beeblebrox<br>
|
<para>
|
||||||
email: zaphod@slartibartfast.com<br></programlisting>
|
Ce qui donne en sortie :
|
||||||
|
</para>
|
||||||
|
<screen>
|
||||||
|
<![CDATA[
|
||||||
|
nom: Zaphod Beeblebrox<br />
|
||||||
|
email: zaphod@slartibartfast.com<br />
|
||||||
|
]]>
|
||||||
|
</screen>
|
||||||
</example>
|
</example>
|
||||||
</sect2>
|
</sect2>
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Reference in New Issue
Block a user