Re: insert space to a string (newbie)

From: Date: Sun, 09 Sep 2001 04:55:50 +0000
Subject: Re: insert space to a string (newbie)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-66581@lists.php.net to get a copy of this message
Maybe something like: $word="washington"; $length=strlen($word); $a=substr($word,0,3); $b=substr($word,3,$length-3); $string=$a." ".$b; print $string; you might want to test for the length of $word first to make sure $word has more than 3 characters --- Andras Kende <andras@kende.com> wrote: > Hi, > > I have a simple question... > How can a space inserted to a string after the 3rd > char ?? > > washington ->> was hington > > > Thanks :) > > > Andras > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: > php-general-unsubscribe@lists.php.net > For additional commands, e-mail: > php-general-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger http://im.yahoo.com

« previous php.general (#66581) next »