I want PHP to put spaces after a certain amount of characters
shai_tan
5:49 pm on Jan 15, 2004 (gmt 0)
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)
(without those ***)
sabai
8:03 pm on Jan 15, 2004 (gmt 0)
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