note 106493 added to function.strip-tags
| From: | MaddyVora at osu1 dot php dot net | Date: | Mon, 14 Nov 2011 07:01:36 +0000 |
| Subject: | note 106493 added to function.strip-tags | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184424@lists.php.net to get a copy of this message | ||
//Here is the function created for strip tags with sub string
<?php
function displaySubStringWithStrip($string, $length=NULL)
{
if ($length == NULL)
$length = 50;
$stringDisplay = substr(strip_tags($string), 0, $length);
if (strlen(strip_tags($string)) > $length)
$stringDisplay .= ' ...';
return $stringDisplay;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 122.169.26.117
----
Manual Page -- http://www.php.net/manual/en/function.strip-tags.php
Edit -- https://master.php.net/note/edit/106493
Del: integrated -- https://master.php.net/note/delete/106493/integrated
Del: useless -- https://master.php.net/note/delete/106493/useless
Del: bad code -- https://master.php.net/note/delete/106493/bad+code
Del: spam -- https://master.php.net/note/delete/106493/spam
Del: non-english -- https://master.php.net/note/delete/106493/non-english
Del: in docs -- https://master.php.net/note/delete/106493/in+docs
Del: other reasons-- https://master.php.net/note/delete/106493
Reject -- https://master.php.net/note/reject/106493
Search -- https://master.php.net/manage/user-notes.php