How to split up a message longer than 160 chars into multiple messages for sending SMS (PHP)
<p>I am working on a small project that sends SMS Messages. I already have the message classes written, and ready to send back in the correct format.</p>

<p>However, I am having a technical design issue. I'm sure it is easily solved, but I haven't come across this issue before so I am lost in the dark.</p>

<p>When I return a message longer than 160 chars, it obviously needs broken down into smaller messages and sent individually. My first thoughts are obviously to get the string length, then divide it by 160 chars, and round up to the greatest whole number (since you cannot send 2.5 messages,only 3) and then each sms needs to have 1/3, 2/3, 3/3 etc in the message as well showing the user which order to read them in. (trust me, they will need it)</p>

<p>My thoughts are obviously using some kind of loop to create a 'new ServiceMessage()' for each 160 char message. But I am unsure exactly how to do it, as well as unsure how to show the count of message (1/2, 2/3, etc).</p>

<p>Fairly simple, I am sure, but this is my first shot at it - so any help is greatly appreciated! Thank you!</p>
