<?php
$sms = "You make me go crazy, crazy in love for you! :* made some changes to the
program so testing it on u :P <3 u baby!!!";
echo strlen($sms) . "\n";
while(strlen($sms) > 160) {
echo "Here\n";
$short = substr($sms,0,159);
echo "Send SMS Long: " . strlen($short) . "\n" ;
$sms = str_replace($short,'',$sms);
echo $short . "\n";
}
if(strlen($sms) > 0) {
echo "Send SMS Short: " . strlen($sms) . "\n";
echo $sms . "\n";
}
?>