Re: how to divide string

From: Date: Mon, 05 Sep 2005 23:04:38 +0000
Subject: Re: how to divide string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-221874@lists.php.net to get a copy of this message
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 earlier versions of php. Jordan On Sep 5, 2005, at 6:50 AM, Adi Zebic wrote:
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: http://www.php.net/unsub.php


« previous php.general (#221874) next »