I have never really understood "for" loops, which I think I need here but I am confused and trying to learn.
I am reading a response from an http post using:
$ret = file($url);
I am then using:
$send = split(" ",$ret[0]);
$send1 = count($send);
echo "count = ",$send1;
foreach($send as $messageid)
{
echo "message id = ",$messageid,"<p>";
}
which shows the info 1 line at a time, but is very messy and I am confused.
The response from the web page reads:
ID: 81f9221c92deaa058ad56ab4192e45b3 To: xxxxxxxxx ID: 7eb83d2a00dd15e56a13a7bd74c0ed6c To: yyyyyyyyyy
all in one line and what I actually need to do is write each "ID" and each "To" to a mysql database.
I have searched the forum but can not find anything that I am able to understand enough to resolve the problem.
Would someone please give me some pointers as to what functions I should look at, otherwise it is going to be a very long day!
Thanks