Hi,
is there any magic function who can give me from:
$string = abcdefghijklmnopqrstuwvxyz;
somthing like this:
abcd
efgh
ijkl
mnop
qrst
uwvx
yz
(each 'x' letters go to the next line)
Thanks a lot,
ADI
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hi Zebic
It is pretty much simple./ Look into the code
$text = abcdefghijklmnopqrstuwvxyz;
$newtext = wordwrap($text, 4, br, 1);
echo $newtext;
// if you want all these chunks in an array use it as
$array = explode(br, $newtext);
echo $array[0];
echo $array[1];
echo $array[2];
Regards
Shafiq
This one time, at band camp, Adi Zebic [EMAIL PROTECTED] wrote:
is there any magic function who can give me from:
$string = abcdefghijklmnopqrstuwvxyz;
somthing like this:
abcd
efgh
ijkl
mnop
qrst
uwvx
yz
$newstring=chunk_split($string, 4, 'br /');
Kevin
--
Democracy is two
If you are using php 5, don't forget about str_split, with 4 as the
second parameter.
http://us2.php.net/str_split
so you could do:
echo implode(br /, str_split($string, 4));
if you still have php 4 or earlier, look at that page anyway as there
is a workaround function in the comments for
4 matches
Mail list logo