Code Library - php
Split Number - (1002 views)
Lets say we have 3037 as our number and we want to splt the first and last two digits into seperate variables
<?
$number = 3037;
$firstnum = substr($number,0,2);
$lastnum = substr($number,2,2);
//and the output would be
echo "First number is $firstnum"; // 30
echo "Last number is $lastnum"; // 37
?>


