Home - PHP- Splitting

/* FluidCoding - Splitting Author: Tonic */ <?php $string = "1234abcd"; //Our string $split = substr($string, 0, 4); //Splits the string, reads from the first character(1) to 4 echo $split; //Echos 1234 ?>

Output

1234


 

Ad Space

Ads