i m a php newbie i trying insert whitespaces into a string for every 3 characters but fail... so i need help pls, thank you
eg: $string = 'AGTCCATGTAC'';
into
$string='AGT CCA TGT AC';
Try:
$str = 'abcdefghijklmnopqrs'; $str2 = chunk_split($str, 3, ' '); echo $str2;