Location: PHPKode > projects > Open Power Template > docs/Opt/syntax.functions.wordwrap.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="pl">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="robots" content="all" />

	<title>wordWrap() - Open Power Template</title>
	
	<link rel="stylesheet" type="text/css" href="design/generic.css" media="all"  />
	<link rel="stylesheet" type="text/css" href="design/print.css" media="print" />
	<!--[if lte IE 6]><link rel="stylesheet" href="design/ie.css" type="text/css" /><![endif]-->	
	<!--[if IE 7]><link rel="stylesheet" href="design/ie7.css" type="text/css" /><![endif]-->
</head>
<body>

<div id="wrap">
	<div id="header">
		<h1>Open Power Template 2.0</h1>
		<h2>wordWrap()</h2>
		<p class="generated">@ 02.09.2010</p>
		<p class="location"><a href="index.html"><strong>User manual</strong></a> &raquo; <a href="syntax.html">Template syntax</a> &raquo; <a href="syntax.functions.html">Function reference</a> &raquo; <a href="syntax.functions.wordwrap.html">wordWrap()</a></p>
	</div>
	
	<div id="content"><dl class="location"><dt><a href="syntax.functions.html">3.6. Function reference</a><br/>3.6.36. wordWrap()</dt><dd class="prev">3.6.35. upper()<br/><a href="syntax.functions.upper.html">&laquo; Previous</a></dd><dd class="next">3.7. Instructions<br/><a href="syntax.instructions.html">Next &raquo;</a></dd></dl>	<h1>3.6.36. wordWrap()</h1><div class="tf_reference"><table><tr><th>Reference</th><td><code>string wordWrap(string $text, integer $length [, string $break [, boolean $cut ]])</code></td></tr></table><hr/></div><p>This function works similarly to <a href="syntax.functions.truncate.html" title="3.6.34. truncate()">truncate()</a>, but instead of truncating the text, it tries to break it with <code>$break</code> (<code>&lt;br /&gt;</code> tag by default). If <code>$cut</code> is set to <strong>true</strong>, the string is always wrapped to the specified width, so if it contains a too long word, it is broken apart.</p>

<blockquote class="information">
  <p>In the <code>$break</code> argument, you might use the formatting codes: <code>\r</code>, <code>\n</code>, <code>\t</code> and <code>\\</code> indicating the following characters: carriage return, new line, tabulation, backslash.</p>
</blockquote>

<!-- ... -->

<blockquote class="error">
  <p>Remember that the tag name in <code>$break</code> must be written using entities, if it is specified explicitly in the template.</p>
</blockquote>
<dl class="location location-bottom"><dt>3.6.36. wordWrap()<br/><a href="syntax.functions.html">3.6. Function reference</a></dt><dd class="prev"><a href="syntax.functions.upper.html">&laquo; Previous</a><br/>3.6.35. upper()</dd><dd class="next"><a href="syntax.instructions.html">Next &raquo;</a><br/>3.7. Instructions</dd></dl>		</div>
	
	<div id="footer">
		<p>Copyright &copy; <a href="http://www.invenzzia.org/">Invenzzia Group 2008-2009</a></p>
		<p>Available under the terms of license: <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License 1.2</a></p>
		<p>Generated by <strong>TypeFriendly 0.1.4</strong> by <a href="http://www.invenzzia.org/">Invenzzia</a></p>
	</div>
</div>

</body>
</html>
Return current item: Open Power Template