note 72503 added to function.chunk-split

From: Date: Mon, 22 Jan 2007 06:06:24 +0000
Subject: note 72503 added to function.chunk-split
Groups: php.notes 
Request: Send a blank email to php-notes+get-122022@lists.php.net to get a copy of this message
This function is very simple and many other functions make this on PHP 5 and even some ones in 4 the good think about this one is that work on php 3.0.6 and 4 function split_hjms_chars($xstr, $xlenint, $xlaststr) { $texttoshow = chunk_split($xstr,$xlenint,"\r\n"); $texttoshow = split("\r\n",$texttoshow); $texttoshow = $texttoshow[0].$xlaststr; return $texttoshow; } // For use echo split_hjms_chars("This is your text",6,"..."); // Will return This i... It is useful to cut long text on preview lists and if the server it's old. Hope it helps some one. Hans Svane ---- Server IP: 201.216.232.3 Probable Submitter: 200.117.187.191 ---- Manual Page -- http://www.php.net/manual/en/function.chunk-split.php Edit -- https://master.php.net/note/edit/72503 Del: integrated -- https://master.php.net/note/delete/72503/integrated Del: useless -- https://master.php.net/note/delete/72503/useless Del: bad code -- https://master.php.net/note/delete/72503/bad+code Del: spam -- https://master.php.net/note/delete/72503/spam Del: non-english -- https://master.php.net/note/delete/72503/non-english Del: in docs -- https://master.php.net/note/delete/72503/in+docs Del: other reasons-- https://master.php.net/note/delete/72503 Reject -- https://master.php.net/note/reject/72503 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#122022) next »