summaryrefslogtreecommitdiffstats
path: root/user_guide/helpers
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2010-07-05 14:11:33 +0200
committerDerek Allard <derek.allard@ellislab.com>2010-07-05 14:11:33 +0200
commita0905f33eabec71e411c837967750e15d6febf19 (patch)
tree842bf73caab243bb51fd4d3169026fe9bd1b6988 /user_guide/helpers
parent7770fde8733eff7024191bd8782a30ab0d1f7619 (diff)
img() will now generate an empty string as an alt attribute if one is not provided.
Diffstat (limited to 'user_guide/helpers')
-rw-r--r--user_guide/helpers/html_helper.html4
1 files changed, 2 insertions, 2 deletions
diff --git a/user_guide/helpers/html_helper.html b/user_guide/helpers/html_helper.html
index a0ac8bdde..50a1c48a4 100644
--- a/user_guide/helpers/html_helper.html
+++ b/user_guide/helpers/html_helper.html
@@ -95,8 +95,8 @@ second the size of the heading. Example:</p>
// gives &lt;img src=&quot;http://site.com/images/picture.jpg&quot; /&gt;</code>
<p>There is an optional second parameter that is a TRUE/FALSE value that specifics if the src should have the page specified by $config['index_page'] added to the address it creates. Presumably, this would be if you were using a media controller.</p>
<p><code>echo img('images/picture.jpg', TRUE);<br />
-// gives &lt;img src=&quot;http://site.com/index.php/images/picture.jpg&quot; /&gt;</code></p>
-<p>Additionally, an associative array can be passed to the img() function for complete control over all attributes and values.</p>
+// gives &lt;img src=&quot;http://site.com/index.php/images/picture.jpg&quot; alt=&quot;&quot; /&gt;</code></p>
+<p>Additionally, an associative array can be passed to the img() function for complete control over all attributes and values. If an alt attribute is not provided, CodeIgniter will generate an empty string.</p>
<p><code> $image_properties = array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'src' =&gt; 'images/picture.jpg',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'alt' =&gt; 'Me, demonstrating how to eat 4 slices of pizza at one time',<br />