Htmltrim: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
mNo edit summary
Line 9: Line 9:
|example=<nowiki>$result = $smcFunc['htmltrim']('&amp;nbsp;This is the string I want to trim ');</nowiki>
|example=<nowiki>$result = $smcFunc['htmltrim']('&amp;nbsp;This is the string I want to trim ');</nowiki>
}}
}}
<noinclude>
<noinclude>
[[Category:General Utility Functions]]</noinclude>
[[Category:General Utility Functions]]</noinclude>

Revision as of 16:24, 11 October 2012

Usage:

$smcFunc['htmltrim'] (string)


Description: Works similar to the php function trim(), additionally also HTML spaces (e.g. &nbsp;) are trimmed.

Parameters:

  • string the string that will be trimmed.

Return: the trimmed string.

Example:

$result = $smcFunc['htmltrim']('&nbsp;This is the string I want to trim ');



Advertisement: