note 31515 added to language.types.string

From: Date: Thu, 24 Apr 2003 16:57:20 +0000
Subject: note 31515 added to language.types.string
Groups: php.notes 
Request: Send a blank email to php-notes+get-47036@lists.php.net to get a copy of this message
This is how I did it, if tou need to cut big text blocks in easy to browse text blocks: $str = "bla bla nla. asdfasd. fdsfd fafsasf. asasdwe fdscz asdvc. afasffas. afafs vcxrqw cvea."; preg_match_all("/.{1500,}?\./s",$str,$out,PREG_PATTERN_ORDER); list($out) = $out; print_r($out); And this is the dynamic menu to navigate between the blocks: for ($i=0; $i<count($out); $i++) { $pgnum = $i+1; echo "<option value=$pgnum>$pgnum</option>"; } -- http://www.php.net/manual/en/language.types.string.php http://master.php.net/manage/user-notes.php?action=edit+31515 http://master.php.net/manage/user-notes.php?action=delete+31515 http://master.php.net/manage/user-notes.php?action=reject+31515

« previous php.notes (#47036) next »