mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-04 18:34:27 +02:00
fixed exampls of html_image and html_checkboxes
This commit is contained in:
@@ -3701,8 +3701,7 @@ index.php:
|
||||
require('Smarty.php.class');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_ids', array(1000,1001,1002,1003));
|
||||
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane
|
||||
Johnson','Charlie Brown'));
|
||||
$smarty->assign('cust_names', array('Joe Schmoe','Jack Smith','Jane Johnson','Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
@@ -3717,9 +3716,10 @@ index.php:
|
||||
require('Smarty.php.class');
|
||||
$smarty = new Smarty;
|
||||
$smarty->assign('cust_checkboxes', array(
|
||||
1001 => 'Joe Schmoe',
|
||||
1002 => 'Jack Smith',
|
||||
1003 => 'Jane Johnson','Charlie Brown'));
|
||||
1000 => 'Joe Schmoe',
|
||||
1001 => 'Jack Smith',
|
||||
1002 => 'Jane Johnson',
|
||||
1003 => 'Charlie Brown'));
|
||||
$smarty->assign('customer_id', 1001);
|
||||
$smarty->display('index.tpl');
|
||||
|
||||
@@ -3730,10 +3730,10 @@ index.tpl:
|
||||
|
||||
OUTPUT: (both examples)
|
||||
|
||||
<input type="checkbox" name="id[]" value="1000">Joe Schmoe<br />
|
||||
<input type="checkbox" name="id[]" value="1001" checked="checked"><br />
|
||||
<input type="checkbox" name="id[]" value="1002">Jane Johnson<br />
|
||||
<input type="checkbox" name="id[]" value="1003">Charlie Brown<br /></programlisting>
|
||||
<label><input type="checkbox" name="checkbox[]" value="1000" />Joe Schmoe</label><br />
|
||||
<label><input type="checkbox" name="checkbox[]" value="1001" checked="checked" />Jack Smith</label><br />
|
||||
<label><input type="checkbox" name="checkbox[]" value="1002" />Jane Johnson</label><br />
|
||||
<label><input type="checkbox" name="checkbox[]" value="1003" />Charlie Brown</label><br /></programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
<sect1 id="language.function.html.image">
|
||||
@@ -3848,9 +3848,13 @@ index.tpl:
|
||||
|
||||
OUTPUT: (possible)
|
||||
|
||||
<img src="pumpkin.jpg" border="0" width="44" height="68">
|
||||
<img src="/path/under/docroot/pumpkin.jpg" border="0" width="44" height="68">
|
||||
<img src="../path/relative/to/currdir/pumpkin.jpg" border="0" width="44" height="68"></programlisting>
|
||||
<img src="pumpkin.jpg" alt="" border="0" width="44" height="68" />
|
||||
<img src="/path/from/docroot/pumpkin.jpg" alt="" border="0" width="44" height="68" />
|
||||
<img src="../path/relative/to/currdir/pumpkin.jpg" alt="" border="0" width="44" height="68" /></programlisting>
|
||||
|
||||
|
||||
|
||||
|
||||
</example>
|
||||
</sect1>
|
||||
<sect1 id="language.function.html.options">
|
||||
|
Reference in New Issue
Block a user