note 48047 deleted from function.substr by betz

From: Date: Fri, 10 Dec 2004 11:47:00 +0000
Subject: note 48047 deleted from function.substr by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-81635@lists.php.net to get a copy of this message
Note Submitter: webmaster at elcurriculum dot com ---- This function cut the text... Only if length of $vTxt > $Car function GetRecortarTexto ($vTxt, $Car) { if (strlen($vTxt) > $Car) { return substr($vTxt, 0, $Car) . "..."; } else return $vTxt; } Exemples: echo GetRecortarTexto("jose el mejor", 4); return "jose..."; More: http://tryke.blogcindario.com ---- Reason: useless note

« previous php.notes (#81635) next »