html_helper.html 78 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091
  1. <!DOCTYPE html>
  2. <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
  3. <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
  4. <head>
  5. <meta charset="utf-8">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>HTML Helper &mdash; CodeIgniter 3.1.11 documentation</title>
  8. <link rel="shortcut icon" href="../_static/ci-icon.ico"/>
  9. <link href='https://fonts.googleapis.com/css?family=Lato:400,700,400italic,700italic|Roboto+Slab:400,700|Inconsolata:400,700&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
  10. <link rel="stylesheet" href="../_static/css/citheme.css" type="text/css" />
  11. <link rel="index" title="Index"
  12. href="../genindex.html"/>
  13. <link rel="search" title="Search" href="../search.html"/>
  14. <link rel="top" title="CodeIgniter 3.1.11 documentation" href="../index.html"/>
  15. <link rel="up" title="Helpers" href="index.html"/>
  16. <link rel="next" title="Inflector Helper" href="inflector_helper.html"/>
  17. <link rel="prev" title="Form Helper" href="form_helper.html"/>
  18. <script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
  19. </head>
  20. <body class="wy-body-for-nav" role="document">
  21. <div id="nav">
  22. <div id="nav_inner">
  23. <div id="pulldown-menu" class="ciNav">
  24. <ul>
  25. <li class="toctree-l1"><a class="reference internal" href="../general/welcome.html">Welcome to CodeIgniter</a></li>
  26. </ul>
  27. <ul>
  28. <li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation Instructions</a><ul>
  29. <li class="toctree-l2"><a class="reference internal" href="../installation/downloads.html">Downloading CodeIgniter</a></li>
  30. <li class="toctree-l2"><a class="reference internal" href="../installation/index.html">Installation Instructions</a></li>
  31. <li class="toctree-l2"><a class="reference internal" href="../installation/upgrading.html">Upgrading From a Previous Version</a></li>
  32. <li class="toctree-l2"><a class="reference internal" href="../installation/troubleshooting.html">Troubleshooting</a></li>
  33. </ul>
  34. </li>
  35. </ul>
  36. <ul>
  37. <li class="toctree-l1"><a class="reference internal" href="../overview/index.html">CodeIgniter Overview</a><ul>
  38. <li class="toctree-l2"><a class="reference internal" href="../overview/getting_started.html">Getting Started</a></li>
  39. <li class="toctree-l2"><a class="reference internal" href="../overview/at_a_glance.html">CodeIgniter at a Glance</a></li>
  40. <li class="toctree-l2"><a class="reference internal" href="../overview/features.html">Supported Features</a></li>
  41. <li class="toctree-l2"><a class="reference internal" href="../overview/appflow.html">Application Flow Chart</a></li>
  42. <li class="toctree-l2"><a class="reference internal" href="../overview/mvc.html">Model-View-Controller</a></li>
  43. <li class="toctree-l2"><a class="reference internal" href="../overview/goals.html">Architectural Goals</a></li>
  44. </ul>
  45. </li>
  46. </ul>
  47. <ul>
  48. <li class="toctree-l1"><a class="reference internal" href="../tutorial/index.html">Tutorial</a><ul>
  49. <li class="toctree-l2"><a class="reference internal" href="../tutorial/static_pages.html">Static pages</a></li>
  50. <li class="toctree-l2"><a class="reference internal" href="../tutorial/news_section.html">News section</a></li>
  51. <li class="toctree-l2"><a class="reference internal" href="../tutorial/create_news_items.html">Create news items</a></li>
  52. <li class="toctree-l2"><a class="reference internal" href="../tutorial/conclusion.html">Conclusion</a></li>
  53. </ul>
  54. </li>
  55. </ul>
  56. <ul>
  57. <li class="toctree-l1"><a class="reference internal" href="../contributing/index.html">Contributing to CodeIgniter</a><ul>
  58. <li class="toctree-l2"><a class="reference internal" href="../documentation/index.html">Writing CodeIgniter Documentation</a></li>
  59. <li class="toctree-l2"><a class="reference internal" href="../DCO.html">Developer’s Certificate of Origin 1.1</a></li>
  60. </ul>
  61. </li>
  62. </ul>
  63. <ul>
  64. <li class="toctree-l1"><a class="reference internal" href="../general/index.html">General Topics</a><ul>
  65. <li class="toctree-l2"><a class="reference internal" href="../general/urls.html">CodeIgniter URLs</a></li>
  66. <li class="toctree-l2"><a class="reference internal" href="../general/controllers.html">Controllers</a></li>
  67. <li class="toctree-l2"><a class="reference internal" href="../general/reserved_names.html">Reserved Names</a></li>
  68. <li class="toctree-l2"><a class="reference internal" href="../general/views.html">Views</a></li>
  69. <li class="toctree-l2"><a class="reference internal" href="../general/models.html">Models</a></li>
  70. <li class="toctree-l2"><a class="reference internal" href="../general/helpers.html">Helpers</a></li>
  71. <li class="toctree-l2"><a class="reference internal" href="../general/libraries.html">Using CodeIgniter Libraries</a></li>
  72. <li class="toctree-l2"><a class="reference internal" href="../general/creating_libraries.html">Creating Libraries</a></li>
  73. <li class="toctree-l2"><a class="reference internal" href="../general/drivers.html">Using CodeIgniter Drivers</a></li>
  74. <li class="toctree-l2"><a class="reference internal" href="../general/creating_drivers.html">Creating Drivers</a></li>
  75. <li class="toctree-l2"><a class="reference internal" href="../general/core_classes.html">Creating Core System Classes</a></li>
  76. <li class="toctree-l2"><a class="reference internal" href="../general/ancillary_classes.html">Creating Ancillary Classes</a></li>
  77. <li class="toctree-l2"><a class="reference internal" href="../general/hooks.html">Hooks - Extending the Framework Core</a></li>
  78. <li class="toctree-l2"><a class="reference internal" href="../general/autoloader.html">Auto-loading Resources</a></li>
  79. <li class="toctree-l2"><a class="reference internal" href="../general/common_functions.html">Common Functions</a></li>
  80. <li class="toctree-l2"><a class="reference internal" href="../general/compatibility_functions.html">Compatibility Functions</a></li>
  81. <li class="toctree-l2"><a class="reference internal" href="../general/routing.html">URI Routing</a></li>
  82. <li class="toctree-l2"><a class="reference internal" href="../general/errors.html">Error Handling</a></li>
  83. <li class="toctree-l2"><a class="reference internal" href="../general/caching.html">Caching</a></li>
  84. <li class="toctree-l2"><a class="reference internal" href="../general/profiling.html">Profiling Your Application</a></li>
  85. <li class="toctree-l2"><a class="reference internal" href="../general/cli.html">Running via the CLI</a></li>
  86. <li class="toctree-l2"><a class="reference internal" href="../general/managing_apps.html">Managing your Applications</a></li>
  87. <li class="toctree-l2"><a class="reference internal" href="../general/environments.html">Handling Multiple Environments</a></li>
  88. <li class="toctree-l2"><a class="reference internal" href="../general/alternative_php.html">Alternate PHP Syntax for View Files</a></li>
  89. <li class="toctree-l2"><a class="reference internal" href="../general/security.html">Security</a></li>
  90. <li class="toctree-l2"><a class="reference internal" href="../general/styleguide.html">PHP Style Guide</a></li>
  91. </ul>
  92. </li>
  93. </ul>
  94. <ul>
  95. <li class="toctree-l1"><a class="reference internal" href="../libraries/index.html">Libraries</a><ul>
  96. <li class="toctree-l2"><a class="reference internal" href="../libraries/benchmark.html">Benchmarking Class</a></li>
  97. <li class="toctree-l2"><a class="reference internal" href="../libraries/caching.html">Caching Driver</a></li>
  98. <li class="toctree-l2"><a class="reference internal" href="../libraries/calendar.html">Calendaring Class</a></li>
  99. <li class="toctree-l2"><a class="reference internal" href="../libraries/cart.html">Shopping Cart Class</a></li>
  100. <li class="toctree-l2"><a class="reference internal" href="../libraries/config.html">Config Class</a></li>
  101. <li class="toctree-l2"><a class="reference internal" href="../libraries/email.html">Email Class</a></li>
  102. <li class="toctree-l2"><a class="reference internal" href="../libraries/encrypt.html">Encrypt Class</a></li>
  103. <li class="toctree-l2"><a class="reference internal" href="../libraries/encryption.html">Encryption Library</a></li>
  104. <li class="toctree-l2"><a class="reference internal" href="../libraries/file_uploading.html">File Uploading Class</a></li>
  105. <li class="toctree-l2"><a class="reference internal" href="../libraries/form_validation.html">Form Validation</a></li>
  106. <li class="toctree-l2"><a class="reference internal" href="../libraries/ftp.html">FTP Class</a></li>
  107. <li class="toctree-l2"><a class="reference internal" href="../libraries/image_lib.html">Image Manipulation Class</a></li>
  108. <li class="toctree-l2"><a class="reference internal" href="../libraries/input.html">Input Class</a></li>
  109. <li class="toctree-l2"><a class="reference internal" href="../libraries/javascript.html">Javascript Class</a></li>
  110. <li class="toctree-l2"><a class="reference internal" href="../libraries/language.html">Language Class</a></li>
  111. <li class="toctree-l2"><a class="reference internal" href="../libraries/loader.html">Loader Class</a></li>
  112. <li class="toctree-l2"><a class="reference internal" href="../libraries/migration.html">Migrations Class</a></li>
  113. <li class="toctree-l2"><a class="reference internal" href="../libraries/output.html">Output Class</a></li>
  114. <li class="toctree-l2"><a class="reference internal" href="../libraries/pagination.html">Pagination Class</a></li>
  115. <li class="toctree-l2"><a class="reference internal" href="../libraries/parser.html">Template Parser Class</a></li>
  116. <li class="toctree-l2"><a class="reference internal" href="../libraries/security.html">Security Class</a></li>
  117. <li class="toctree-l2"><a class="reference internal" href="../libraries/sessions.html">Session Library</a></li>
  118. <li class="toctree-l2"><a class="reference internal" href="../libraries/table.html">HTML Table Class</a></li>
  119. <li class="toctree-l2"><a class="reference internal" href="../libraries/trackback.html">Trackback Class</a></li>
  120. <li class="toctree-l2"><a class="reference internal" href="../libraries/typography.html">Typography Class</a></li>
  121. <li class="toctree-l2"><a class="reference internal" href="../libraries/unit_testing.html">Unit Testing Class</a></li>
  122. <li class="toctree-l2"><a class="reference internal" href="../libraries/uri.html">URI Class</a></li>
  123. <li class="toctree-l2"><a class="reference internal" href="../libraries/user_agent.html">User Agent Class</a></li>
  124. <li class="toctree-l2"><a class="reference internal" href="../libraries/xmlrpc.html">XML-RPC and XML-RPC Server Classes</a></li>
  125. <li class="toctree-l2"><a class="reference internal" href="../libraries/zip.html">Zip Encoding Class</a></li>
  126. </ul>
  127. </li>
  128. </ul>
  129. <ul>
  130. <li class="toctree-l1"><a class="reference internal" href="../database/index.html">Database Reference</a><ul>
  131. <li class="toctree-l2"><a class="reference internal" href="../database/examples.html">Quick Start: Usage Examples</a></li>
  132. <li class="toctree-l2"><a class="reference internal" href="../database/configuration.html">Database Configuration</a></li>
  133. <li class="toctree-l2"><a class="reference internal" href="../database/connecting.html">Connecting to a Database</a></li>
  134. <li class="toctree-l2"><a class="reference internal" href="../database/queries.html">Running Queries</a></li>
  135. <li class="toctree-l2"><a class="reference internal" href="../database/results.html">Generating Query Results</a></li>
  136. <li class="toctree-l2"><a class="reference internal" href="../database/helpers.html">Query Helper Functions</a></li>
  137. <li class="toctree-l2"><a class="reference internal" href="../database/query_builder.html">Query Builder Class</a></li>
  138. <li class="toctree-l2"><a class="reference internal" href="../database/transactions.html">Transactions</a></li>
  139. <li class="toctree-l2"><a class="reference internal" href="../database/metadata.html">Getting MetaData</a></li>
  140. <li class="toctree-l2"><a class="reference internal" href="../database/call_function.html">Custom Function Calls</a></li>
  141. <li class="toctree-l2"><a class="reference internal" href="../database/caching.html">Query Caching</a></li>
  142. <li class="toctree-l2"><a class="reference internal" href="../database/forge.html">Database Manipulation with Database Forge</a></li>
  143. <li class="toctree-l2"><a class="reference internal" href="../database/utilities.html">Database Utilities Class</a></li>
  144. <li class="toctree-l2"><a class="reference internal" href="../database/db_driver_reference.html">Database Driver Reference</a></li>
  145. </ul>
  146. </li>
  147. </ul>
  148. <ul class="current">
  149. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Helpers</a><ul class="current">
  150. <li class="toctree-l2"><a class="reference internal" href="array_helper.html">Array Helper</a></li>
  151. <li class="toctree-l2"><a class="reference internal" href="captcha_helper.html">CAPTCHA Helper</a></li>
  152. <li class="toctree-l2"><a class="reference internal" href="cookie_helper.html">Cookie Helper</a></li>
  153. <li class="toctree-l2"><a class="reference internal" href="date_helper.html">Date Helper</a></li>
  154. <li class="toctree-l2"><a class="reference internal" href="directory_helper.html">Directory Helper</a></li>
  155. <li class="toctree-l2"><a class="reference internal" href="download_helper.html">Download Helper</a></li>
  156. <li class="toctree-l2"><a class="reference internal" href="email_helper.html">Email Helper</a></li>
  157. <li class="toctree-l2"><a class="reference internal" href="file_helper.html">File Helper</a></li>
  158. <li class="toctree-l2"><a class="reference internal" href="form_helper.html">Form Helper</a></li>
  159. <li class="toctree-l2 current"><a class="current reference internal" href="#">HTML Helper</a></li>
  160. <li class="toctree-l2"><a class="reference internal" href="inflector_helper.html">Inflector Helper</a></li>
  161. <li class="toctree-l2"><a class="reference internal" href="language_helper.html">Language Helper</a></li>
  162. <li class="toctree-l2"><a class="reference internal" href="number_helper.html">Number Helper</a></li>
  163. <li class="toctree-l2"><a class="reference internal" href="path_helper.html">Path Helper</a></li>
  164. <li class="toctree-l2"><a class="reference internal" href="security_helper.html">Security Helper</a></li>
  165. <li class="toctree-l2"><a class="reference internal" href="smiley_helper.html">Smiley Helper</a></li>
  166. <li class="toctree-l2"><a class="reference internal" href="string_helper.html">String Helper</a></li>
  167. <li class="toctree-l2"><a class="reference internal" href="text_helper.html">Text Helper</a></li>
  168. <li class="toctree-l2"><a class="reference internal" href="typography_helper.html">Typography Helper</a></li>
  169. <li class="toctree-l2"><a class="reference internal" href="url_helper.html">URL Helper</a></li>
  170. <li class="toctree-l2"><a class="reference internal" href="xml_helper.html">XML Helper</a></li>
  171. </ul>
  172. </li>
  173. </ul>
  174. </div>
  175. </div>
  176. </div>
  177. <div id="nav2">
  178. <a href="#" id="openToc">
  179. <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgAAZABkAAD/7AARRHVja3kAAQAEAAAARgAA/+4ADkFkb2JlAGTAAAAAAf/bAIQABAMDAwMDBAMDBAYEAwQGBwUEBAUHCAYGBwYGCAoICQkJCQgKCgwMDAwMCgwMDQ0MDBERERERFBQUFBQUFBQUFAEEBQUIBwgPCgoPFA4ODhQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQU/8AAEQgAKwCaAwERAAIRAQMRAf/EAHsAAQAABwEBAAAAAAAAAAAAAAABAwQFBgcIAgkBAQAAAAAAAAAAAAAAAAAAAAAQAAEDAwICBwYEAgsAAAAAAAIBAwQAEQUSBiEHkROTVNQWGDFBUVIUCHEiMtOUFWGBobHRQlMkZIRVEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwDSC+ygkOOaUoKigUCgUCgUCgUCgUCgUCgUCgkuGguIP9FBMFb0Hqg7We+3jlmIqqYFf4ub+/QYlnOR/LqIBKGFUbf8qWv971BytQXXE7Y3Lnm3HsFhp2TaZJAdchRXpIgSpdEJWxJEW3xoKV7F5OMy7JkQn2o7D6w33XGjEAkoiqrJEqIiOIiKuhePCgqp22dyYyS3CyWHnQ5joG61HkRnmnTbaFSMhExRVQRRVJU9iUHjE7ez+fJ0MFipmUNhBV8YUd2SoIV9KkjQla9ltegttBdPLW4/qocL+UTfrMiHW4+P9M71shuyrqaHTcxsl7jegpsji8nh5ZwMvDfgTm0RTjSmjYdFCS6KoOIipdFunCgmNYTMv457MMY6U7iI6oMieDDhRm1VbIhuoOkbqtuK0Hpzb+eZcYZexUxt6UyUqK2cd0SdjtgrhOgijcgERUlJOCIl6CpgbP3blRI8XgMjNARAyKNDfeRBdFDBVUAXgQrqH4pxoJTu2NysY97LP4ac1io5q1InHFeGO24LnVKJuKOkSQ/yKir+rh7aCLG1dzypZQI2FnvTgccYOM3FeN0XWERXAUEFVQgQkUktdLpegm+Td3/Xli/L+S/mYNJIOF9G/wBeLKrZHFb0akG6W1WtQWSg3Dyg5e7V3fipE3O4/wCrktyzYA+ufas2LbZIlmnAT2kvuoN1wft95augilglX/tzP3qCu9O3LL/wV/i5v79BvmTADq14UGu91467Z6U9y0HzH/ncj/U/sT/CgynZG7I2NezpZGUjIycJkYkZSG+uQ81pbBNKLxJfjwoMqZ3/ALYHl35AJ7/cuwHcu5k7r1Q5pHetBjquqVVJWGxj9Zrtcl/Ggy3dHMvauR3HFZj5nHNxSyW5JISYDMoIwx8tFIGHZhPNaykGapr6rUAiicEoMG21lMRj8buPAz8xhJrr7uOeiPTCyAwXUaGR1mgozbTusOsFLEiJ7fbQa/h7gcjy2H3V6xppwDNtUSxCJIqp7valBuWVzJ22xuCROXNNZiJkMtms0DbjUkAZjzoDrTMd9dDRI44ZC2YsrYdKWP2WDT2S3N9dNdlRYrGMYc06IURXSYb0igrpWS485xVNS6nF4rwslkoMwnbpgZLB7bmt5uMweAhDEl4B5uSLzzqTnnyVpW2jaJHRMSIjdDiiotvy3DOE5rYTEbkl5yFn28k7JyG4c7AU2HtLH1uKfaiMPI40CdYbpNtmLdwTSn5rewLNld+7TLdeal4WarWBkbVKBjgdElMJJwAAY5fl4kB3b1fp4XvagsGS3FjJfLzDNtS8aeXx7LzT7TyzByQE5PccRGRC0ZRUDRV6y62vbjagzLmJzS2vuPK43JY6aP1TW6Jz+RIWyFtyC06y3EkiiinAo7YCqfq1AqqnGgsOH3lhZO8d1pmcpB8j5XIm9OYlBJSQ/FSS4427DKO0RC8AlcEMhFdViRR1WDWR5t3WXVuL1d106kG9vdeye2g60+1FDyW0shIcXVpyroXt8I8dfd+NB1vioAdWnD3UF1+gD4UFc6CEKpagxXN43rwJLUHz7yX2c8zokt9uHlsPIhA4aRnnHJTLptIS6CNsY7iASpxUUMkReGpfbQW0vtN5pitvrsN28rwtBD0nc0+/Yft5XhaB6TuaXfsP28rwtA9J3NPv2H7eV4Wgek7mn37D9vK8LQPSdzT79h+3leFoHpO5pd+w/byvC0D0nc0u/Yft5XhaB6TuaXfsP28rwtA9J3NLv2H7eV4Wgek7ml37D9vK8LQPSdzS79h+3leFoHpO5p9+w/byvC0E9r7Reazy2HIYVPxkS/CUHVn26cosxyv2g7h89LYmZSXOenvLEQ1YaQ222RATcQCP8rSGqqA8S02W2pQ6FhMoAIlqCtsnwoCpdKClejI4i3Sgtb+GBxVuNBSFt1pV/RQefLjPyUDy4z8lA8uM/JQPLjPyUDy4z8lA8uM/JQPLjPyUDy4z8lA8uM/JQPLjPyUDy4z8lA8utJ/koJ7WCbBU/LQXOPAFq1koK8B0pag90CggtBBf6qB0UDooHRQOigdFA6KB0UDooHRQOigdFA6KB0UDooI0EaBQf//Z" title="Toggle Table of Contents" alt="Toggle Table of Contents" />
  180. </a>
  181. </div>
  182. <div class="wy-grid-for-nav">
  183. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  184. <div class="wy-side-nav-search">
  185. <a href="../index.html" class="fa fa-home"> CodeIgniter</a>
  186. <div role="search">
  187. <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
  188. <input type="text" name="q" placeholder="Search docs" />
  189. <input type="hidden" name="check_keywords" value="yes" />
  190. <input type="hidden" name="area" value="default" />
  191. </form>
  192. </div>
  193. </div>
  194. <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
  195. <ul>
  196. <li class="toctree-l1"><a class="reference internal" href="../general/welcome.html">Welcome to CodeIgniter</a></li>
  197. </ul>
  198. <ul>
  199. <li class="toctree-l1"><a class="reference internal" href="../installation/index.html">Installation Instructions</a><ul>
  200. <li class="toctree-l2"><a class="reference internal" href="../installation/downloads.html">Downloading CodeIgniter</a></li>
  201. <li class="toctree-l2"><a class="reference internal" href="../installation/index.html">Installation Instructions</a></li>
  202. <li class="toctree-l2"><a class="reference internal" href="../installation/upgrading.html">Upgrading From a Previous Version</a></li>
  203. <li class="toctree-l2"><a class="reference internal" href="../installation/troubleshooting.html">Troubleshooting</a></li>
  204. </ul>
  205. </li>
  206. </ul>
  207. <ul>
  208. <li class="toctree-l1"><a class="reference internal" href="../overview/index.html">CodeIgniter Overview</a><ul>
  209. <li class="toctree-l2"><a class="reference internal" href="../overview/getting_started.html">Getting Started</a></li>
  210. <li class="toctree-l2"><a class="reference internal" href="../overview/at_a_glance.html">CodeIgniter at a Glance</a></li>
  211. <li class="toctree-l2"><a class="reference internal" href="../overview/features.html">Supported Features</a></li>
  212. <li class="toctree-l2"><a class="reference internal" href="../overview/appflow.html">Application Flow Chart</a></li>
  213. <li class="toctree-l2"><a class="reference internal" href="../overview/mvc.html">Model-View-Controller</a></li>
  214. <li class="toctree-l2"><a class="reference internal" href="../overview/goals.html">Architectural Goals</a></li>
  215. </ul>
  216. </li>
  217. </ul>
  218. <ul>
  219. <li class="toctree-l1"><a class="reference internal" href="../tutorial/index.html">Tutorial</a><ul>
  220. <li class="toctree-l2"><a class="reference internal" href="../tutorial/static_pages.html">Static pages</a></li>
  221. <li class="toctree-l2"><a class="reference internal" href="../tutorial/news_section.html">News section</a></li>
  222. <li class="toctree-l2"><a class="reference internal" href="../tutorial/create_news_items.html">Create news items</a></li>
  223. <li class="toctree-l2"><a class="reference internal" href="../tutorial/conclusion.html">Conclusion</a></li>
  224. </ul>
  225. </li>
  226. </ul>
  227. <ul>
  228. <li class="toctree-l1"><a class="reference internal" href="../contributing/index.html">Contributing to CodeIgniter</a><ul>
  229. <li class="toctree-l2"><a class="reference internal" href="../documentation/index.html">Writing CodeIgniter Documentation</a></li>
  230. <li class="toctree-l2"><a class="reference internal" href="../DCO.html">Developer’s Certificate of Origin 1.1</a></li>
  231. </ul>
  232. </li>
  233. </ul>
  234. <ul>
  235. <li class="toctree-l1"><a class="reference internal" href="../general/index.html">General Topics</a><ul>
  236. <li class="toctree-l2"><a class="reference internal" href="../general/urls.html">CodeIgniter URLs</a></li>
  237. <li class="toctree-l2"><a class="reference internal" href="../general/controllers.html">Controllers</a></li>
  238. <li class="toctree-l2"><a class="reference internal" href="../general/reserved_names.html">Reserved Names</a></li>
  239. <li class="toctree-l2"><a class="reference internal" href="../general/views.html">Views</a></li>
  240. <li class="toctree-l2"><a class="reference internal" href="../general/models.html">Models</a></li>
  241. <li class="toctree-l2"><a class="reference internal" href="../general/helpers.html">Helpers</a></li>
  242. <li class="toctree-l2"><a class="reference internal" href="../general/libraries.html">Using CodeIgniter Libraries</a></li>
  243. <li class="toctree-l2"><a class="reference internal" href="../general/creating_libraries.html">Creating Libraries</a></li>
  244. <li class="toctree-l2"><a class="reference internal" href="../general/drivers.html">Using CodeIgniter Drivers</a></li>
  245. <li class="toctree-l2"><a class="reference internal" href="../general/creating_drivers.html">Creating Drivers</a></li>
  246. <li class="toctree-l2"><a class="reference internal" href="../general/core_classes.html">Creating Core System Classes</a></li>
  247. <li class="toctree-l2"><a class="reference internal" href="../general/ancillary_classes.html">Creating Ancillary Classes</a></li>
  248. <li class="toctree-l2"><a class="reference internal" href="../general/hooks.html">Hooks - Extending the Framework Core</a></li>
  249. <li class="toctree-l2"><a class="reference internal" href="../general/autoloader.html">Auto-loading Resources</a></li>
  250. <li class="toctree-l2"><a class="reference internal" href="../general/common_functions.html">Common Functions</a></li>
  251. <li class="toctree-l2"><a class="reference internal" href="../general/compatibility_functions.html">Compatibility Functions</a></li>
  252. <li class="toctree-l2"><a class="reference internal" href="../general/routing.html">URI Routing</a></li>
  253. <li class="toctree-l2"><a class="reference internal" href="../general/errors.html">Error Handling</a></li>
  254. <li class="toctree-l2"><a class="reference internal" href="../general/caching.html">Caching</a></li>
  255. <li class="toctree-l2"><a class="reference internal" href="../general/profiling.html">Profiling Your Application</a></li>
  256. <li class="toctree-l2"><a class="reference internal" href="../general/cli.html">Running via the CLI</a></li>
  257. <li class="toctree-l2"><a class="reference internal" href="../general/managing_apps.html">Managing your Applications</a></li>
  258. <li class="toctree-l2"><a class="reference internal" href="../general/environments.html">Handling Multiple Environments</a></li>
  259. <li class="toctree-l2"><a class="reference internal" href="../general/alternative_php.html">Alternate PHP Syntax for View Files</a></li>
  260. <li class="toctree-l2"><a class="reference internal" href="../general/security.html">Security</a></li>
  261. <li class="toctree-l2"><a class="reference internal" href="../general/styleguide.html">PHP Style Guide</a></li>
  262. </ul>
  263. </li>
  264. </ul>
  265. <ul>
  266. <li class="toctree-l1"><a class="reference internal" href="../libraries/index.html">Libraries</a><ul>
  267. <li class="toctree-l2"><a class="reference internal" href="../libraries/benchmark.html">Benchmarking Class</a></li>
  268. <li class="toctree-l2"><a class="reference internal" href="../libraries/caching.html">Caching Driver</a></li>
  269. <li class="toctree-l2"><a class="reference internal" href="../libraries/calendar.html">Calendaring Class</a></li>
  270. <li class="toctree-l2"><a class="reference internal" href="../libraries/cart.html">Shopping Cart Class</a></li>
  271. <li class="toctree-l2"><a class="reference internal" href="../libraries/config.html">Config Class</a></li>
  272. <li class="toctree-l2"><a class="reference internal" href="../libraries/email.html">Email Class</a></li>
  273. <li class="toctree-l2"><a class="reference internal" href="../libraries/encrypt.html">Encrypt Class</a></li>
  274. <li class="toctree-l2"><a class="reference internal" href="../libraries/encryption.html">Encryption Library</a></li>
  275. <li class="toctree-l2"><a class="reference internal" href="../libraries/file_uploading.html">File Uploading Class</a></li>
  276. <li class="toctree-l2"><a class="reference internal" href="../libraries/form_validation.html">Form Validation</a></li>
  277. <li class="toctree-l2"><a class="reference internal" href="../libraries/ftp.html">FTP Class</a></li>
  278. <li class="toctree-l2"><a class="reference internal" href="../libraries/image_lib.html">Image Manipulation Class</a></li>
  279. <li class="toctree-l2"><a class="reference internal" href="../libraries/input.html">Input Class</a></li>
  280. <li class="toctree-l2"><a class="reference internal" href="../libraries/javascript.html">Javascript Class</a></li>
  281. <li class="toctree-l2"><a class="reference internal" href="../libraries/language.html">Language Class</a></li>
  282. <li class="toctree-l2"><a class="reference internal" href="../libraries/loader.html">Loader Class</a></li>
  283. <li class="toctree-l2"><a class="reference internal" href="../libraries/migration.html">Migrations Class</a></li>
  284. <li class="toctree-l2"><a class="reference internal" href="../libraries/output.html">Output Class</a></li>
  285. <li class="toctree-l2"><a class="reference internal" href="../libraries/pagination.html">Pagination Class</a></li>
  286. <li class="toctree-l2"><a class="reference internal" href="../libraries/parser.html">Template Parser Class</a></li>
  287. <li class="toctree-l2"><a class="reference internal" href="../libraries/security.html">Security Class</a></li>
  288. <li class="toctree-l2"><a class="reference internal" href="../libraries/sessions.html">Session Library</a></li>
  289. <li class="toctree-l2"><a class="reference internal" href="../libraries/table.html">HTML Table Class</a></li>
  290. <li class="toctree-l2"><a class="reference internal" href="../libraries/trackback.html">Trackback Class</a></li>
  291. <li class="toctree-l2"><a class="reference internal" href="../libraries/typography.html">Typography Class</a></li>
  292. <li class="toctree-l2"><a class="reference internal" href="../libraries/unit_testing.html">Unit Testing Class</a></li>
  293. <li class="toctree-l2"><a class="reference internal" href="../libraries/uri.html">URI Class</a></li>
  294. <li class="toctree-l2"><a class="reference internal" href="../libraries/user_agent.html">User Agent Class</a></li>
  295. <li class="toctree-l2"><a class="reference internal" href="../libraries/xmlrpc.html">XML-RPC and XML-RPC Server Classes</a></li>
  296. <li class="toctree-l2"><a class="reference internal" href="../libraries/zip.html">Zip Encoding Class</a></li>
  297. </ul>
  298. </li>
  299. </ul>
  300. <ul>
  301. <li class="toctree-l1"><a class="reference internal" href="../database/index.html">Database Reference</a><ul>
  302. <li class="toctree-l2"><a class="reference internal" href="../database/examples.html">Quick Start: Usage Examples</a></li>
  303. <li class="toctree-l2"><a class="reference internal" href="../database/configuration.html">Database Configuration</a></li>
  304. <li class="toctree-l2"><a class="reference internal" href="../database/connecting.html">Connecting to a Database</a></li>
  305. <li class="toctree-l2"><a class="reference internal" href="../database/queries.html">Running Queries</a></li>
  306. <li class="toctree-l2"><a class="reference internal" href="../database/results.html">Generating Query Results</a></li>
  307. <li class="toctree-l2"><a class="reference internal" href="../database/helpers.html">Query Helper Functions</a></li>
  308. <li class="toctree-l2"><a class="reference internal" href="../database/query_builder.html">Query Builder Class</a></li>
  309. <li class="toctree-l2"><a class="reference internal" href="../database/transactions.html">Transactions</a></li>
  310. <li class="toctree-l2"><a class="reference internal" href="../database/metadata.html">Getting MetaData</a></li>
  311. <li class="toctree-l2"><a class="reference internal" href="../database/call_function.html">Custom Function Calls</a></li>
  312. <li class="toctree-l2"><a class="reference internal" href="../database/caching.html">Query Caching</a></li>
  313. <li class="toctree-l2"><a class="reference internal" href="../database/forge.html">Database Manipulation with Database Forge</a></li>
  314. <li class="toctree-l2"><a class="reference internal" href="../database/utilities.html">Database Utilities Class</a></li>
  315. <li class="toctree-l2"><a class="reference internal" href="../database/db_driver_reference.html">Database Driver Reference</a></li>
  316. </ul>
  317. </li>
  318. </ul>
  319. <ul class="current">
  320. <li class="toctree-l1 current"><a class="reference internal" href="index.html">Helpers</a><ul class="current">
  321. <li class="toctree-l2"><a class="reference internal" href="array_helper.html">Array Helper</a></li>
  322. <li class="toctree-l2"><a class="reference internal" href="captcha_helper.html">CAPTCHA Helper</a></li>
  323. <li class="toctree-l2"><a class="reference internal" href="cookie_helper.html">Cookie Helper</a></li>
  324. <li class="toctree-l2"><a class="reference internal" href="date_helper.html">Date Helper</a></li>
  325. <li class="toctree-l2"><a class="reference internal" href="directory_helper.html">Directory Helper</a></li>
  326. <li class="toctree-l2"><a class="reference internal" href="download_helper.html">Download Helper</a></li>
  327. <li class="toctree-l2"><a class="reference internal" href="email_helper.html">Email Helper</a></li>
  328. <li class="toctree-l2"><a class="reference internal" href="file_helper.html">File Helper</a></li>
  329. <li class="toctree-l2"><a class="reference internal" href="form_helper.html">Form Helper</a></li>
  330. <li class="toctree-l2 current"><a class="current reference internal" href="#">HTML Helper</a></li>
  331. <li class="toctree-l2"><a class="reference internal" href="inflector_helper.html">Inflector Helper</a></li>
  332. <li class="toctree-l2"><a class="reference internal" href="language_helper.html">Language Helper</a></li>
  333. <li class="toctree-l2"><a class="reference internal" href="number_helper.html">Number Helper</a></li>
  334. <li class="toctree-l2"><a class="reference internal" href="path_helper.html">Path Helper</a></li>
  335. <li class="toctree-l2"><a class="reference internal" href="security_helper.html">Security Helper</a></li>
  336. <li class="toctree-l2"><a class="reference internal" href="smiley_helper.html">Smiley Helper</a></li>
  337. <li class="toctree-l2"><a class="reference internal" href="string_helper.html">String Helper</a></li>
  338. <li class="toctree-l2"><a class="reference internal" href="text_helper.html">Text Helper</a></li>
  339. <li class="toctree-l2"><a class="reference internal" href="typography_helper.html">Typography Helper</a></li>
  340. <li class="toctree-l2"><a class="reference internal" href="url_helper.html">URL Helper</a></li>
  341. <li class="toctree-l2"><a class="reference internal" href="xml_helper.html">XML Helper</a></li>
  342. </ul>
  343. </li>
  344. </ul>
  345. </div>
  346. &nbsp;
  347. </nav>
  348. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
  349. <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
  350. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  351. <a href="../index.html">CodeIgniter</a>
  352. </nav>
  353. <div class="wy-nav-content">
  354. <div class="rst-content">
  355. <div role="navigation" aria-label="breadcrumbs navigation">
  356. <ul class="wy-breadcrumbs">
  357. <li><a href="../index.html">Docs</a> &raquo;</li>
  358. <li><a href="index.html">Helpers</a> &raquo;</li>
  359. <li>HTML Helper</li>
  360. <li class="wy-breadcrumbs-aside">
  361. </li>
  362. <div style="float:right;margin-left:5px;" id="closeMe">
  363. <img title="Classic Layout" alt="classic layout" src="data:image/gif;base64,R0lGODlhFAAUAJEAAAAAADMzM////wAAACH5BAUUAAIALAAAAAAUABQAAAImlI+py+0PU5gRBRDM3DxbWoXis42X13USOLauUIqnlsaH/eY6UwAAOw==" />
  364. </div>
  365. </ul>
  366. <hr/>
  367. </div>
  368. <div role="main" class="document">
  369. <div class="section" id="html-helper">
  370. <h1>HTML Helper<a class="headerlink" href="#html-helper" title="Permalink to this headline">¶</a></h1>
  371. <p>The HTML Helper file contains functions that assist in working with
  372. HTML.</p>
  373. <div class="contents local topic" id="contents">
  374. <ul class="simple">
  375. <li><a class="reference internal" href="#loading-this-helper" id="id1">Loading this Helper</a></li>
  376. <li><a class="reference internal" href="#available-functions" id="id2">Available Functions</a></li>
  377. </ul>
  378. </div>
  379. <div class="custom-index container"></div><div class="section" id="loading-this-helper">
  380. <h2><a class="toc-backref" href="#id1">Loading this Helper</a><a class="headerlink" href="#loading-this-helper" title="Permalink to this headline">¶</a></h2>
  381. <p>This helper is loaded using the following code:</p>
  382. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="nv">$this</span><span class="o">-&gt;</span><span class="na">load</span><span class="o">-&gt;</span><span class="na">helper</span><span class="p">(</span><span class="s1">&#39;html&#39;</span><span class="p">);</span>
  383. </pre></div>
  384. </div>
  385. </div>
  386. <div class="section" id="available-functions">
  387. <h2><a class="toc-backref" href="#id2">Available Functions</a><a class="headerlink" href="#available-functions" title="Permalink to this headline">¶</a></h2>
  388. <p>The following functions are available:</p>
  389. <dl class="function">
  390. <dt id="heading">
  391. <code class="descname">heading</code><span class="sig-paren">(</span><span class="optional">[</span><em>$data = ''</em><span class="optional">[</span>, <em>$h = '1'</em><span class="optional">[</span>, <em>$attributes = ''</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#heading" title="Permalink to this definition">¶</a></dt>
  392. <dd><table class="docutils field-list" frame="void" rules="none">
  393. <col class="field-name" />
  394. <col class="field-body" />
  395. <tbody valign="top">
  396. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  397. <li><strong>$data</strong> (<em>string</em>) – Content</li>
  398. <li><strong>$h</strong> (<em>string</em>) – Heading level</li>
  399. <li><strong>$attributes</strong> (<em>mixed</em>) – HTML attributes</li>
  400. </ul>
  401. </td>
  402. </tr>
  403. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML heading tag</p>
  404. </td>
  405. </tr>
  406. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  407. </td>
  408. </tr>
  409. </tbody>
  410. </table>
  411. <p>Lets you create HTML heading tags. The first parameter will contain the
  412. data, the second the size of the heading. Example:</p>
  413. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">heading</span><span class="p">(</span><span class="s1">&#39;Welcome!&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">);</span>
  414. </pre></div>
  415. </div>
  416. <p>The above would produce: &lt;h3&gt;Welcome!&lt;/h3&gt;</p>
  417. <p>Additionally, in order to add attributes to the heading tag such as HTML
  418. classes, ids or inline styles, a third parameter accepts either a string
  419. or an array:</p>
  420. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">heading</span><span class="p">(</span><span class="s1">&#39;Welcome!&#39;</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="s1">&#39;class=&quot;pink&quot;&#39;</span><span class="p">);</span>
  421. <span class="k">echo</span> <span class="nx">heading</span><span class="p">(</span><span class="s1">&#39;How are you?&#39;</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="k">array</span><span class="p">(</span><span class="s1">&#39;id&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;question&#39;</span><span class="p">,</span> <span class="s1">&#39;class&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;green&#39;</span><span class="p">));</span>
  422. </pre></div>
  423. </div>
  424. <p>The above code produces:</p>
  425. <div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">h3</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;pink&quot;</span><span class="p">&gt;</span>Welcome!<span class="p">&lt;</span><span class="nt">h3</span><span class="p">&gt;</span>
  426. <span class="p">&lt;</span><span class="nt">h4</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;question&quot;</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;green&quot;</span><span class="p">&gt;</span>How are you?<span class="p">&lt;/</span><span class="nt">h4</span><span class="p">&gt;</span>
  427. </pre></div>
  428. </div>
  429. </dd></dl>
  430. <dl class="function">
  431. <dt id="img">
  432. <code class="descname">img</code><span class="sig-paren">(</span><span class="optional">[</span><em>$src = ''</em><span class="optional">[</span>, <em>$index_page = FALSE</em><span class="optional">[</span>, <em>$attributes = ''</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#img" title="Permalink to this definition">¶</a></dt>
  433. <dd><table class="docutils field-list" frame="void" rules="none">
  434. <col class="field-name" />
  435. <col class="field-body" />
  436. <tbody valign="top">
  437. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  438. <li><strong>$src</strong> (<em>string</em>) – Image source data</li>
  439. <li><strong>$index_page</strong> (<em>bool</em>) – Whether to treat $src as a routed URI string</li>
  440. <li><strong>$attributes</strong> (<em>array</em>) – HTML attributes</li>
  441. </ul>
  442. </td>
  443. </tr>
  444. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML image tag</p>
  445. </td>
  446. </tr>
  447. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  448. </td>
  449. </tr>
  450. </tbody>
  451. </table>
  452. <p>Lets you create HTML &lt;img /&gt; tags. The first parameter contains the
  453. image source. Example:</p>
  454. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">img</span><span class="p">(</span><span class="s1">&#39;images/picture.jpg&#39;</span><span class="p">);</span> <span class="c1">// gives &lt;img src=&quot;http://site.com/images/picture.jpg&quot; /&gt;</span>
  455. </pre></div>
  456. </div>
  457. <p>There is an optional second parameter that is a TRUE/FALSE value that
  458. specifics if the <em>src</em> should have the page specified by
  459. <code class="docutils literal"><span class="pre">$config['index_page']</span></code> added to the address it creates.
  460. Presumably, this would be if you were using a media controller:</p>
  461. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">img</span><span class="p">(</span><span class="s1">&#39;images/picture.jpg&#39;</span><span class="p">,</span> <span class="k">TRUE</span><span class="p">);</span> <span class="c1">// gives &lt;img src=&quot;http://site.com/index.php/images/picture.jpg&quot; alt=&quot;&quot; /&gt;</span>
  462. </pre></div>
  463. </div>
  464. <p>Additionally, an associative array can be passed to the <code class="docutils literal"><span class="pre">img()</span></code> function
  465. for complete control over all attributes and values. If an <em>alt</em> attribute
  466. is not provided, CodeIgniter will generate an empty string.</p>
  467. <p>Example:</p>
  468. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="nv">$image_properties</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  469. <span class="s1">&#39;src&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;images/picture.jpg&#39;</span><span class="p">,</span>
  470. <span class="s1">&#39;alt&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Me, demonstrating how to eat 4 slices of pizza at one time&#39;</span><span class="p">,</span>
  471. <span class="s1">&#39;class&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;post_images&#39;</span><span class="p">,</span>
  472. <span class="s1">&#39;width&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;200&#39;</span><span class="p">,</span>
  473. <span class="s1">&#39;height&#39;</span><span class="o">=&gt;</span> <span class="s1">&#39;200&#39;</span><span class="p">,</span>
  474. <span class="s1">&#39;title&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;That was quite a night&#39;</span><span class="p">,</span>
  475. <span class="s1">&#39;rel&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;lightbox&#39;</span>
  476. <span class="p">);</span>
  477. <span class="nx">img</span><span class="p">(</span><span class="nv">$image_properties</span><span class="p">);</span>
  478. <span class="c1">// &lt;img src=&quot;http://site.com/index.php/images/picture.jpg&quot; alt=&quot;Me, demonstrating how to eat 4 slices of pizza at one time&quot; class=&quot;post_images&quot; width=&quot;200&quot; height=&quot;200&quot; title=&quot;That was quite a night&quot; rel=&quot;lightbox&quot; /&gt;</span>
  479. </pre></div>
  480. </div>
  481. </dd></dl>
  482. <dl class="function">
  483. <dt id="link_tag">
  484. <code class="descname">link_tag</code><span class="sig-paren">(</span><span class="optional">[</span><em>$href = ''</em><span class="optional">[</span>, <em>$rel = 'stylesheet'</em><span class="optional">[</span>, <em>$type = 'text/css'</em><span class="optional">[</span>, <em>$title = ''</em><span class="optional">[</span>, <em>$media = ''</em><span class="optional">[</span>, <em>$index_page = FALSE</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#link_tag" title="Permalink to this definition">¶</a></dt>
  485. <dd><table class="docutils field-list" frame="void" rules="none">
  486. <col class="field-name" />
  487. <col class="field-body" />
  488. <tbody valign="top">
  489. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  490. <li><strong>$href</strong> (<em>string</em>) – What are we linking to</li>
  491. <li><strong>$rel</strong> (<em>string</em>) – Relation type</li>
  492. <li><strong>$type</strong> (<em>string</em>) – Type of the related document</li>
  493. <li><strong>$title</strong> (<em>string</em>) – Link title</li>
  494. <li><strong>$media</strong> (<em>string</em>) – Media type</li>
  495. <li><strong>$index_page</strong> (<em>bool</em>) – Whether to treat $src as a routed URI string</li>
  496. </ul>
  497. </td>
  498. </tr>
  499. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML link tag</p>
  500. </td>
  501. </tr>
  502. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  503. </td>
  504. </tr>
  505. </tbody>
  506. </table>
  507. <p>Lets you create HTML &lt;link /&gt; tags. This is useful for stylesheet links,
  508. as well as other links. The parameters are <em>href</em>, with optional <em>rel</em>,
  509. <em>type</em>, <em>title</em>, <em>media</em> and <em>index_page</em>.</p>
  510. <p><em>index_page</em> is a boolean value that specifies if the <em>href</em> should have
  511. the page specified by <code class="docutils literal"><span class="pre">$config['index_page']</span></code> added to the address it creates.</p>
  512. <p>Example:</p>
  513. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">link_tag</span><span class="p">(</span><span class="s1">&#39;css/mystyles.css&#39;</span><span class="p">);</span>
  514. <span class="c1">// gives &lt;link href=&quot;http://site.com/css/mystyles.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; /&gt;</span>
  515. </pre></div>
  516. </div>
  517. <p>Further examples:</p>
  518. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">link_tag</span><span class="p">(</span><span class="s1">&#39;favicon.ico&#39;</span><span class="p">,</span> <span class="s1">&#39;shortcut icon&#39;</span><span class="p">,</span> <span class="s1">&#39;image/ico&#39;</span><span class="p">);</span>
  519. <span class="c1">// &lt;link href=&quot;http://site.com/favicon.ico&quot; rel=&quot;shortcut icon&quot; type=&quot;image/ico&quot; /&gt;</span>
  520. <span class="k">echo</span> <span class="nx">link_tag</span><span class="p">(</span><span class="s1">&#39;feed&#39;</span><span class="p">,</span> <span class="s1">&#39;alternate&#39;</span><span class="p">,</span> <span class="s1">&#39;application/rss+xml&#39;</span><span class="p">,</span> <span class="s1">&#39;My RSS Feed&#39;</span><span class="p">);</span>
  521. <span class="c1">// &lt;link href=&quot;http://site.com/feed&quot; rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;My RSS Feed&quot; /&gt;</span>
  522. </pre></div>
  523. </div>
  524. <p>Additionally, an associative array can be passed to the <code class="docutils literal"><span class="pre">link()</span></code> function
  525. for complete control over all attributes and values:</p>
  526. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="nv">$link</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  527. <span class="s1">&#39;href&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;css/printer.css&#39;</span><span class="p">,</span>
  528. <span class="s1">&#39;rel&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;stylesheet&#39;</span><span class="p">,</span>
  529. <span class="s1">&#39;type&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;text/css&#39;</span><span class="p">,</span>
  530. <span class="s1">&#39;media&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;print&#39;</span>
  531. <span class="p">);</span>
  532. <span class="k">echo</span> <span class="nx">link_tag</span><span class="p">(</span><span class="nv">$link</span><span class="p">);</span>
  533. <span class="c1">// &lt;link href=&quot;http://site.com/css/printer.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot; media=&quot;print&quot; /&gt;</span>
  534. </pre></div>
  535. </div>
  536. </dd></dl>
  537. <dl class="function">
  538. <dt id="ul">
  539. <code class="descname">ul</code><span class="sig-paren">(</span><em>$list</em><span class="optional">[</span>, <em>$attributes = ''</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#ul" title="Permalink to this definition">¶</a></dt>
  540. <dd><table class="docutils field-list" frame="void" rules="none">
  541. <col class="field-name" />
  542. <col class="field-body" />
  543. <tbody valign="top">
  544. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  545. <li><strong>$list</strong> (<em>array</em>) – List entries</li>
  546. <li><strong>$attributes</strong> (<em>array</em>) – HTML attributes</li>
  547. </ul>
  548. </td>
  549. </tr>
  550. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML-formatted unordered list</p>
  551. </td>
  552. </tr>
  553. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  554. </td>
  555. </tr>
  556. </tbody>
  557. </table>
  558. <p>Permits you to generate unordered HTML lists from simple or
  559. multi-dimensional arrays. Example:</p>
  560. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="nv">$list</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  561. <span class="s1">&#39;red&#39;</span><span class="p">,</span>
  562. <span class="s1">&#39;blue&#39;</span><span class="p">,</span>
  563. <span class="s1">&#39;green&#39;</span><span class="p">,</span>
  564. <span class="s1">&#39;yellow&#39;</span>
  565. <span class="p">);</span>
  566. <span class="nv">$attributes</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  567. <span class="s1">&#39;class&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;boldlist&#39;</span><span class="p">,</span>
  568. <span class="s1">&#39;id&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;mylist&#39;</span>
  569. <span class="p">);</span>
  570. <span class="k">echo</span> <span class="nx">ul</span><span class="p">(</span><span class="nv">$list</span><span class="p">,</span> <span class="nv">$attributes</span><span class="p">);</span>
  571. </pre></div>
  572. </div>
  573. <p>The above code will produce this:</p>
  574. <div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;boldlist&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;mylist&quot;</span><span class="p">&gt;</span>
  575. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>red<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  576. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>blue<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  577. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>green<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  578. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>yellow<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  579. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  580. </pre></div>
  581. </div>
  582. <p>Here is a more complex example, using a multi-dimensional array:</p>
  583. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="nv">$attributes</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  584. <span class="s1">&#39;class&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;boldlist&#39;</span><span class="p">,</span>
  585. <span class="s1">&#39;id&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;mylist&#39;</span>
  586. <span class="p">);</span>
  587. <span class="nv">$list</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  588. <span class="s1">&#39;colors&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  589. <span class="s1">&#39;red&#39;</span><span class="p">,</span>
  590. <span class="s1">&#39;blue&#39;</span><span class="p">,</span>
  591. <span class="s1">&#39;green&#39;</span>
  592. <span class="p">),</span>
  593. <span class="s1">&#39;shapes&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  594. <span class="s1">&#39;round&#39;</span><span class="p">,</span>
  595. <span class="s1">&#39;square&#39;</span><span class="p">,</span>
  596. <span class="s1">&#39;circles&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  597. <span class="s1">&#39;ellipse&#39;</span><span class="p">,</span>
  598. <span class="s1">&#39;oval&#39;</span><span class="p">,</span>
  599. <span class="s1">&#39;sphere&#39;</span>
  600. <span class="p">)</span>
  601. <span class="p">),</span>
  602. <span class="s1">&#39;moods&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  603. <span class="s1">&#39;happy&#39;</span><span class="p">,</span>
  604. <span class="s1">&#39;upset&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  605. <span class="s1">&#39;defeated&#39;</span> <span class="o">=&gt;</span> <span class="k">array</span><span class="p">(</span>
  606. <span class="s1">&#39;dejected&#39;</span><span class="p">,</span>
  607. <span class="s1">&#39;disheartened&#39;</span><span class="p">,</span>
  608. <span class="s1">&#39;depressed&#39;</span>
  609. <span class="p">),</span>
  610. <span class="s1">&#39;annoyed&#39;</span><span class="p">,</span>
  611. <span class="s1">&#39;cross&#39;</span><span class="p">,</span>
  612. <span class="s1">&#39;angry&#39;</span>
  613. <span class="p">)</span>
  614. <span class="p">)</span>
  615. <span class="p">);</span>
  616. <span class="k">echo</span> <span class="nx">ul</span><span class="p">(</span><span class="nv">$list</span><span class="p">,</span> <span class="nv">$attributes</span><span class="p">);</span>
  617. </pre></div>
  618. </div>
  619. <p>The above code will produce this:</p>
  620. <div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">ul</span> <span class="na">class</span><span class="o">=</span><span class="s">&quot;boldlist&quot;</span> <span class="na">id</span><span class="o">=</span><span class="s">&quot;mylist&quot;</span><span class="p">&gt;</span>
  621. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>colors
  622. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  623. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>red<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  624. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>blue<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  625. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>green<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  626. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  627. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  628. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>shapes
  629. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  630. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>round<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  631. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>suare<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  632. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>circles
  633. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  634. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>elipse<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  635. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>oval<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  636. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>sphere<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  637. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  638. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  639. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  640. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  641. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>moods
  642. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  643. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>happy<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  644. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>upset
  645. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  646. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>defeated
  647. <span class="p">&lt;</span><span class="nt">ul</span><span class="p">&gt;</span>
  648. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>dejected<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  649. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>disheartened<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  650. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>depressed<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  651. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  652. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  653. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>annoyed<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  654. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>cross<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  655. <span class="p">&lt;</span><span class="nt">li</span><span class="p">&gt;</span>angry<span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  656. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  657. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  658. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  659. <span class="p">&lt;/</span><span class="nt">li</span><span class="p">&gt;</span>
  660. <span class="p">&lt;/</span><span class="nt">ul</span><span class="p">&gt;</span>
  661. </pre></div>
  662. </div>
  663. </dd></dl>
  664. <dl class="function">
  665. <dt id="ol">
  666. <code class="descname">ol</code><span class="sig-paren">(</span><em>$list</em>, <em>$attributes = ''</em><span class="sig-paren">)</span><a class="headerlink" href="#ol" title="Permalink to this definition">¶</a></dt>
  667. <dd><table class="docutils field-list" frame="void" rules="none">
  668. <col class="field-name" />
  669. <col class="field-body" />
  670. <tbody valign="top">
  671. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  672. <li><strong>$list</strong> (<em>array</em>) – List entries</li>
  673. <li><strong>$attributes</strong> (<em>array</em>) – HTML attributes</li>
  674. </ul>
  675. </td>
  676. </tr>
  677. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML-formatted ordered list</p>
  678. </td>
  679. </tr>
  680. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  681. </td>
  682. </tr>
  683. </tbody>
  684. </table>
  685. <p>Identical to <a class="reference internal" href="#ul" title="ul"><code class="xref php php-func docutils literal"><span class="pre">ul()</span></code></a>, only it produces the &lt;ol&gt; tag for
  686. ordered lists instead of &lt;ul&gt;.</p>
  687. </dd></dl>
  688. <dl class="function">
  689. <dt id="meta">
  690. <code class="descname">meta</code><span class="sig-paren">(</span><span class="optional">[</span><em>$name = ''</em><span class="optional">[</span>, <em>$content = ''</em><span class="optional">[</span>, <em>$type = 'name'</em><span class="optional">[</span>, <em>$newline = &quot;n&quot;</em><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#meta" title="Permalink to this definition">¶</a></dt>
  691. <dd><table class="docutils field-list" frame="void" rules="none">
  692. <col class="field-name" />
  693. <col class="field-body" />
  694. <tbody valign="top">
  695. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  696. <li><strong>$name</strong> (<em>string</em>) – Meta name</li>
  697. <li><strong>$content</strong> (<em>string</em>) – Meta content</li>
  698. <li><strong>$type</strong> (<em>string</em>) – Meta type</li>
  699. <li><strong>$newline</strong> (<em>string</em>) – Newline character</li>
  700. </ul>
  701. </td>
  702. </tr>
  703. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML meta tag</p>
  704. </td>
  705. </tr>
  706. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  707. </td>
  708. </tr>
  709. </tbody>
  710. </table>
  711. <p>Helps you generate meta tags. You can pass strings to the function, or
  712. simple arrays, or multidimensional ones.</p>
  713. <p>Examples:</p>
  714. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">meta</span><span class="p">(</span><span class="s1">&#39;description&#39;</span><span class="p">,</span> <span class="s1">&#39;My Great site&#39;</span><span class="p">);</span>
  715. <span class="c1">// Generates: &lt;meta name=&quot;description&quot; content=&quot;My Great Site&quot; /&gt;</span>
  716. <span class="k">echo</span> <span class="nx">meta</span><span class="p">(</span><span class="s1">&#39;Content-type&#39;</span><span class="p">,</span> <span class="s1">&#39;text/html; charset=utf-8&#39;</span><span class="p">,</span> <span class="s1">&#39;equiv&#39;</span><span class="p">);</span>
  717. <span class="c1">// Note the third parameter. Can be &quot;equiv&quot; or &quot;name&quot;</span>
  718. <span class="c1">// Generates: &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</span>
  719. <span class="k">echo</span> <span class="nx">meta</span><span class="p">(</span><span class="k">array</span><span class="p">(</span><span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;robots&#39;</span><span class="p">,</span> <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;no-cache&#39;</span><span class="p">));</span>
  720. <span class="c1">// Generates: &lt;meta name=&quot;robots&quot; content=&quot;no-cache&quot; /&gt;</span>
  721. <span class="nv">$meta</span> <span class="o">=</span> <span class="k">array</span><span class="p">(</span>
  722. <span class="k">array</span><span class="p">(</span>
  723. <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;robots&#39;</span><span class="p">,</span>
  724. <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;no-cache&#39;</span>
  725. <span class="p">),</span>
  726. <span class="k">array</span><span class="p">(</span>
  727. <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;description&#39;</span><span class="p">,</span>
  728. <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;My Great Site&#39;</span>
  729. <span class="p">),</span>
  730. <span class="k">array</span><span class="p">(</span>
  731. <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;keywords&#39;</span><span class="p">,</span>
  732. <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;love, passion, intrigue, deception&#39;</span>
  733. <span class="p">),</span>
  734. <span class="k">array</span><span class="p">(</span>
  735. <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;robots&#39;</span><span class="p">,</span>
  736. <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;no-cache&#39;</span>
  737. <span class="p">),</span>
  738. <span class="k">array</span><span class="p">(</span>
  739. <span class="s1">&#39;name&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;Content-type&#39;</span><span class="p">,</span>
  740. <span class="s1">&#39;content&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;text/html; charset=utf-8&#39;</span><span class="p">,</span> <span class="s1">&#39;type&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;equiv&#39;</span>
  741. <span class="p">)</span>
  742. <span class="p">);</span>
  743. <span class="k">echo</span> <span class="nx">meta</span><span class="p">(</span><span class="nv">$meta</span><span class="p">);</span>
  744. <span class="c1">// Generates:</span>
  745. <span class="c1">// &lt;meta name=&quot;robots&quot; content=&quot;no-cache&quot; /&gt;</span>
  746. <span class="c1">// &lt;meta name=&quot;description&quot; content=&quot;My Great Site&quot; /&gt;</span>
  747. <span class="c1">// &lt;meta name=&quot;keywords&quot; content=&quot;love, passion, intrigue, deception&quot; /&gt;</span>
  748. <span class="c1">// &lt;meta name=&quot;robots&quot; content=&quot;no-cache&quot; /&gt;</span>
  749. <span class="c1">// &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;</span>
  750. </pre></div>
  751. </div>
  752. </dd></dl>
  753. <dl class="function">
  754. <dt id="doctype">
  755. <code class="descname">doctype</code><span class="sig-paren">(</span><span class="optional">[</span><em>$type = 'xhtml1-strict'</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#doctype" title="Permalink to this definition">¶</a></dt>
  756. <dd><table class="docutils field-list" frame="void" rules="none">
  757. <col class="field-name" />
  758. <col class="field-body" />
  759. <tbody valign="top">
  760. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  761. <li><strong>$type</strong> (<em>string</em>) – Doctype name</li>
  762. </ul>
  763. </td>
  764. </tr>
  765. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML DocType tag</p>
  766. </td>
  767. </tr>
  768. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  769. </td>
  770. </tr>
  771. </tbody>
  772. </table>
  773. <p>Helps you generate document type declarations, or DTD’s. XHTML 1.0
  774. Strict is used by default, but many doctypes are available.</p>
  775. <p>Example:</p>
  776. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">doctype</span><span class="p">();</span> <span class="c1">// &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;&gt;</span>
  777. <span class="k">echo</span> <span class="nx">doctype</span><span class="p">(</span><span class="s1">&#39;html4-trans&#39;</span><span class="p">);</span> <span class="c1">// &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; &quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;</span>
  778. </pre></div>
  779. </div>
  780. <p>The following is a list of doctype choices. These are configurable, and
  781. pulled from application/config/doctypes.php</p>
  782. <table border="1" class="docutils">
  783. <colgroup>
  784. <col width="16%" />
  785. <col width="10%" />
  786. <col width="74%" />
  787. </colgroup>
  788. <thead valign="bottom">
  789. <tr class="row-odd"><th class="head">Document type</th>
  790. <th class="head">Option</th>
  791. <th class="head">Result</th>
  792. </tr>
  793. </thead>
  794. <tbody valign="top">
  795. <tr class="row-even"><td>XHTML 1.1</td>
  796. <td>xhtml11</td>
  797. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1//EN” “<a class="reference external" href="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd</a>”&gt;</td>
  798. </tr>
  799. <tr class="row-odd"><td>XHTML 1.0 Strict</td>
  800. <td>xhtml1-strict</td>
  801. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” “<a class="reference external" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</a>”&gt;</td>
  802. </tr>
  803. <tr class="row-even"><td>XHTML 1.0 Transitional</td>
  804. <td>xhtml1-trans</td>
  805. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “<a class="reference external" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>”&gt;</td>
  806. </tr>
  807. <tr class="row-odd"><td>XHTML 1.0 Frameset</td>
  808. <td>xhtml1-frame</td>
  809. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Frameset//EN” “<a class="reference external" href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</a>”&gt;</td>
  810. </tr>
  811. <tr class="row-even"><td>XHTML Basic 1.1</td>
  812. <td>xhtml-basic11</td>
  813. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML Basic 1.1//EN” “<a class="reference external" href="http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd</a>”&gt;</td>
  814. </tr>
  815. <tr class="row-odd"><td>HTML 5</td>
  816. <td>html5</td>
  817. <td>&lt;!DOCTYPE html&gt;</td>
  818. </tr>
  819. <tr class="row-even"><td>HTML 4 Strict</td>
  820. <td>html4-strict</td>
  821. <td>&lt;!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN” “<a class="reference external" href="http://www.w3.org/TR/html4/strict.dtd">http://www.w3.org/TR/html4/strict.dtd</a>”&gt;</td>
  822. </tr>
  823. <tr class="row-odd"><td>HTML 4 Transitional</td>
  824. <td>html4-trans</td>
  825. <td>&lt;!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “<a class="reference external" href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>”&gt;</td>
  826. </tr>
  827. <tr class="row-even"><td>HTML 4 Frameset</td>
  828. <td>html4-frame</td>
  829. <td>&lt;!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Frameset//EN” “<a class="reference external" href="http://www.w3.org/TR/html4/frameset.dtd">http://www.w3.org/TR/html4/frameset.dtd</a>”&gt;</td>
  830. </tr>
  831. <tr class="row-odd"><td>MathML 1.01</td>
  832. <td>mathml1</td>
  833. <td>&lt;!DOCTYPE math SYSTEM “<a class="reference external" href="http://www.w3.org/Math/DTD/mathml1/mathml.dtd">http://www.w3.org/Math/DTD/mathml1/mathml.dtd</a>”&gt;</td>
  834. </tr>
  835. <tr class="row-even"><td>MathML 2.0</td>
  836. <td>mathml2</td>
  837. <td>&lt;!DOCTYPE math PUBLIC “-//W3C//DTD MathML 2.0//EN” “<a class="reference external" href="http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">http://www.w3.org/Math/DTD/mathml2/mathml2.dtd</a>”&gt;</td>
  838. </tr>
  839. <tr class="row-odd"><td>SVG 1.0</td>
  840. <td>svg10</td>
  841. <td>&lt;!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.0//EN” “<a class="reference external" href="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd</a>”&gt;</td>
  842. </tr>
  843. <tr class="row-even"><td>SVG 1.1 Full</td>
  844. <td>svg11</td>
  845. <td>&lt;!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1//EN” “<a class="reference external" href="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd</a>”&gt;</td>
  846. </tr>
  847. <tr class="row-odd"><td>SVG 1.1 Basic</td>
  848. <td>svg11-basic</td>
  849. <td>&lt;!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1 Basic//EN” “<a class="reference external" href="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd</a>”&gt;</td>
  850. </tr>
  851. <tr class="row-even"><td>SVG 1.1 Tiny</td>
  852. <td>svg11-tiny</td>
  853. <td>&lt;!DOCTYPE svg PUBLIC “-//W3C//DTD SVG 1.1 Tiny//EN” “<a class="reference external" href="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd</a>”&gt;</td>
  854. </tr>
  855. <tr class="row-odd"><td>XHTML+MathML+SVG (XHTML host)</td>
  856. <td>xhtml-math-svg-xh</td>
  857. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN” “<a class="reference external" href="http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd</a>”&gt;</td>
  858. </tr>
  859. <tr class="row-even"><td>XHTML+MathML+SVG (SVG host)</td>
  860. <td>xhtml-math-svg-sh</td>
  861. <td>&lt;!DOCTYPE svg:svg PUBLIC “-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN” “http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd”&gt;</td>
  862. </tr>
  863. <tr class="row-odd"><td>XHTML+RDFa 1.0</td>
  864. <td>xhtml-rdfa-1</td>
  865. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML+RDFa 1.0//EN” “<a class="reference external" href="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd</a>”&gt;</td>
  866. </tr>
  867. <tr class="row-even"><td>XHTML+RDFa 1.1</td>
  868. <td>xhtml-rdfa-2</td>
  869. <td>&lt;!DOCTYPE html PUBLIC “-//W3C//DTD XHTML+RDFa 1.1//EN” “<a class="reference external" href="http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd</a>”&gt;</td>
  870. </tr>
  871. </tbody>
  872. </table>
  873. </dd></dl>
  874. <dl class="function">
  875. <dt id="br">
  876. <code class="descname">br</code><span class="sig-paren">(</span><span class="optional">[</span><em>$count = 1</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#br" title="Permalink to this definition">¶</a></dt>
  877. <dd><table class="docutils field-list" frame="void" rules="none">
  878. <col class="field-name" />
  879. <col class="field-body" />
  880. <tbody valign="top">
  881. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  882. <li><strong>$count</strong> (<em>int</em>) – Number of times to repeat the tag</li>
  883. </ul>
  884. </td>
  885. </tr>
  886. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">HTML line break tag</p>
  887. </td>
  888. </tr>
  889. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  890. </td>
  891. </tr>
  892. </tbody>
  893. </table>
  894. <p>Generates line break tags (&lt;br /&gt;) based on the number you submit.
  895. Example:</p>
  896. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">br</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
  897. </pre></div>
  898. </div>
  899. <p>The above would produce:</p>
  900. <div class="highlight-html"><div class="highlight"><pre><span></span><span class="p">&lt;</span><span class="nt">br</span> <span class="p">/&gt;&lt;</span><span class="nt">br</span> <span class="p">/&gt;&lt;</span><span class="nt">br</span> <span class="p">/&gt;</span>
  901. </pre></div>
  902. </div>
  903. <div class="admonition note">
  904. <p class="first admonition-title">Note</p>
  905. <p class="last">This function is DEPRECATED. Use the native <code class="docutils literal"><span class="pre">str_repeat()</span></code>
  906. in combination with <code class="docutils literal"><span class="pre">&lt;br</span> <span class="pre">/&gt;</span></code> instead.</p>
  907. </div>
  908. </dd></dl>
  909. <dl class="function">
  910. <dt id="nbs">
  911. <code class="descname">nbs</code><span class="sig-paren">(</span><span class="optional">[</span><em>$num = 1</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#nbs" title="Permalink to this definition">¶</a></dt>
  912. <dd><table class="docutils field-list" frame="void" rules="none">
  913. <col class="field-name" />
  914. <col class="field-body" />
  915. <tbody valign="top">
  916. <tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first simple">
  917. <li><strong>$num</strong> (<em>int</em>) – Number of space entities to produce</li>
  918. </ul>
  919. </td>
  920. </tr>
  921. <tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first">A sequence of non-breaking space HTML entities</p>
  922. </td>
  923. </tr>
  924. <tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body"><p class="first last">string</p>
  925. </td>
  926. </tr>
  927. </tbody>
  928. </table>
  929. <p>Generates non-breaking spaces (&amp;nbsp;) based on the number you submit.
  930. Example:</p>
  931. <div class="highlight-ci"><div class="highlight"><pre><span></span><span class="k">echo</span> <span class="nx">nbs</span><span class="p">(</span><span class="mi">3</span><span class="p">);</span>
  932. </pre></div>
  933. </div>
  934. <p>The above would produce:</p>
  935. <div class="highlight-html"><div class="highlight"><pre><span></span><span class="ni">&amp;nbsp;&amp;nbsp;&amp;nbsp;</span>
  936. </pre></div>
  937. </div>
  938. <div class="admonition note">
  939. <p class="first admonition-title">Note</p>
  940. <p class="last">This function is DEPRECATED. Use the native <code class="docutils literal"><span class="pre">str_repeat()</span></code>
  941. in combination with <code class="docutils literal"><span class="pre">&amp;nbsp;</span></code> instead.</p>
  942. </div>
  943. </dd></dl>
  944. </div>
  945. </div>
  946. </div>
  947. <footer>
  948. <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
  949. <a href="inflector_helper.html" class="btn btn-neutral float-right" title="Inflector Helper">Next <span class="fa fa-arrow-circle-right"></span></a>
  950. <a href="form_helper.html" class="btn btn-neutral" title="Form Helper"><span class="fa fa-arrow-circle-left"></span> Previous</a>
  951. </div>
  952. <hr/>
  953. <div role="contentinfo">
  954. <p>
  955. &copy; Copyright 2014 - 2019, British Columbia Institute of Technology.
  956. Last updated on Sep 19, 2019.
  957. </p>
  958. </div>
  959. Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
  960. </footer>
  961. </div>
  962. </div>
  963. </section>
  964. </div>
  965. <script type="text/javascript">
  966. var DOCUMENTATION_OPTIONS = {
  967. URL_ROOT:'../',
  968. VERSION:'3.1.11',
  969. COLLAPSE_INDEX:false,
  970. FILE_SUFFIX:'.html',
  971. HAS_SOURCE: false
  972. };
  973. </script>
  974. <script type="text/javascript" src="../_static/jquery.js"></script>
  975. <script type="text/javascript" src="../_static/underscore.js"></script>
  976. <script type="text/javascript" src="../_static/doctools.js"></script>
  977. <script type="text/javascript" src="../_static/js/theme.js"></script>
  978. <script type="text/javascript">
  979. jQuery(function () {
  980. SphinxRtdTheme.StickyNav.enable();
  981. });
  982. </script>
  983. </body>
  984. </html>