note 31515 deleted from language.types.string by colder

From: Date: Tue, 17 Oct 2006 18:00:13 +0000
Subject: note 31515 deleted from language.types.string by colder
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-118633@lists.php.net to get a copy of this message
Note Submitter: gmarik at hotbox dot ru ---- 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>"; }

« previous php.notes (#118633) next »