Forum Moderators: coopster

Message Too Old, No Replies

Format text

I want PHP to put spaces after a certain amount of characters

         

shai_tan

5:49 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



I want PHP to put spaces after a certain amount of characters, for example if I have a text string like
********xxxxxxxxxxxxxxxx and I want it to be
xxxxxxxx xxxxxxxx xxxxxxxx xxxxxxxx,
how would I do that?
Thanks in advance

shai_tan

5:49 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



(without those ***)

sabai

8:03 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



use
str_split
to split the string into chunks & use
implode
to join it together with spaces... look in the manual to get the specifics of these functions

shai_tan

8:30 pm on Jan 15, 2004 (gmt 0)

10+ Year Member



Thanks alot!