note 41982 deleted from function.strlen by didou

From: Date: Wed, 28 Apr 2004 10:25:28 +0000
Subject: note 41982 deleted from function.strlen by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-68938@lists.php.net to get a copy of this message
Note Submitter: plarekazani@compuserve.de ---- //wenn der Text länger als 9 zeichen ist, dann werden // 8 zeichen daraus gemacht mit ... am Shluß //ansonsten bleibt alles kürzer als 9 zeichen unverändert $strlong = strlen($text); if ($strlong >= 9) { $text= substr("$text", 0, 8); $text= ("$text..."); } echo ("$text"); // wenn $text (1a2a3a4a5a6a7a8a) // dann $text = 1a2a3a4a... // wenn $text (1a2a3a) // dann $text = 1a2a3a

« previous php.notes (#68938) next »