simple question in php?

  • Thread starter Thread starter Chandru .
  • Start date Start date
C

Chandru .

Guest
i want a program that will split the given string by length of 3 char string.

<?php

while ( strlen($msg )>3)
{

$msg1=substr($msg,0,3)
echo $msg1
$msg = substr(3,strlen($msg ))
}

?>
can anyone correct the code for me?
 
Back
Top