function smssubstr($string, $length) {
if(strlen($string)
return $string;
}
$strcut = '';
for($i = 0; $i
$strcut .= ord($string[$i]) > 127 ? $string[$i].$string[++$i] : $string[$i];
}
return $strcut;
}
for($i=1; $i
${'smscontent'.$i} = smssubstr($message,$smsper);
$message = str_replace(${'smscontent'.$i},"",$message);
}