Added <![CDATA[ tags, <br> becomes <br />

This commit is contained in:
gerald
2004-07-04 09:51:24 +00:00
parent cb9c28337f
commit 70e05aaf37

View File

@@ -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-&gt;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-&gt;display('index.tpl'); $smarty->display('index.tpl');
?>
index.tpl: ]]>
</programlisting>
{$Contacts[0]}&lt;br&gt; <para>
{$Contacts[1]}&lt;br&gt; Ou index.tpl est :
{* you can print arrays of arrays as well *} </para>
{$Contacts[2][0]}&lt;br&gt; <programlisting>
{$Contacts[2][1]}&lt;br&gt; <![CDATA[
{$Contacts[0]}<br />
SORTIE: {$Contacts[1]}<br />
{* Vous pouvez <20>galement afficher des tableaux *}
555-222-9876&lt;br&gt; {$Contacts[2][0]}<br />
zaphod@slartibartfast.com&lt;br&gt; {$Contacts[2][1]}<br />
555-444-3333&lt;br&gt; ]]>
555-111-1234&lt;br&gt;</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&lt;br&gt;
<example> <example>
<title>acc<EFBFBD>der aux attributs des objets</title> <title>acc<EFBFBD>der aux attributs des objets</title>
<programlisting> <programlisting>
nom: {$person-&gt;name}&lt;br&gt; <![CDATA[
email: {$person-&gt;email}&lt;br&gt; nom: {$person->name}<br />
email: {$person->email}<br />
SORTIE: ]]>
</programlisting>
nom: Zaphod Beeblebrox&lt;br&gt; <para>
email: zaphod@slartibartfast.com&lt;br&gt;</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>