note 41982 added to function.strlen

From: Date: Wed, 28 Apr 2004 10:22:43 +0000
Subject: note 41982 added to function.strlen
Groups: php.notes 
Request: Send a blank email to php-notes+get-68937@lists.php.net to get a copy of this message
//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 ---- Manual Page -- http://www.php.net/manual/en/function.strlen.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+41982 Delete -- http://master.php.net/manage/user-notes.php?action=delete+41982&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+41982&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#68937) next »