PHP POST Response handling?

I got an app that posts some values to a PHP file. The PHP file then makes a sqlite query to a database and returns a list of values and prints them. I can easily then with my app just use response[1] shown in the Corona SDK docs to see what the PHP prints. I can also have the app print it out in the corona terminal on multiple lines by changing
to \n using response[1]:gsub(" < br > ", “\n”).

But how can I manipulate the response items one by one and maybe put all of them in a new array?
[import]uid: 24111 topic_id: 21391 reply_id: 321391[/import]

Is there someway I can count the number of linebreaks? [import]uid: 24111 topic_id: 21391 reply_id: 84759[/import]