guess this is weird
im sorry to do this to you
That's OK. I'll have a little play with the data and see what comes up. I get this with the code I supplied:
44797672146744781781414929/02/2012 16:43:30SMS0 ATE0 AT+CMGS=+447817814149 Array (  => 44797672146744781781414929/02/2012 16:43:30SMS0 ATE0 AT+CMGS=+447817814149  => 447976721467447817814149  => 29/02/2012  => 16:43:30  => ATE0 AT+CMGS=+447817814149 ) 44797672147044781781414929/02/2012 16:47:06SMS0 bonjour Array (  => 44797672147044781781414929/02/2012 16:47:06SMS0 bonjour  => 447976721470447817814149  => 29/02/2012  => 16:47:06  => bonjour ) 44797672146744781781414929/02/2012 16:49:29SMS0 Array (  => 44797672146744781781414929/02/2012 16:49:29SMS0  => 447976721467447817814149  => 29/02/2012  => 16:49:29  => )
how are you getting that output ?
perhaps it's untrimmed - try this:
i think i found out whats the problem is, its preg_match that is not working because its not sorting out anything i just double checked it by commenting out preg_match still get the same numbers. just viewed the source code so here is the format
output = 44797672146744781781414929/02/2012 16:43:30SMS0 ATE0 AT+CMGS=+447817814149
html format :
hope the html format helps
Wait a minute - where did all that xml come from? Was that always there? I thought that your peekmessage() method was stripping all those. Even if it is being stripped, there may be hidden characters e.g. '\n'.
So if the peekmessage isn't removing the tags, you could just use SimpleXML to get the data into an array or go overboard with a pregmatch.
i guess peek message did not remove all the xml tags
either that or the carriage returns in the last match are causing the fail.