I'm desperately to work this situation out but failing miserably and now it's really getting to me. I've searched far and wide for a solution all to no avail - please can someone help.
🙁
I'm using CURL to pass variables to an ASP page which executes a small executable on a remote Win32 machine, this ASP page then echo's the results and my PHP page 'grabs' this ouput.
It only generates 13 small lines of results and the fetching part works fine.
HOWEVER....
I can't seem to work out how to loop through each line of the output.
the output is currently stored in the variable $reponse
the output is this
#pw+407907425541506+1#<br />
#pw+484977604201171+2#<br />
#pw+734250557224351+3#<br />
#pw+942912263041517+4#<br />
#pw+849901267711604+5#<br />
#pw+955122275363121+6#<br />
#pw+057043270542743+7#<br />
I need to loop through each line and minus 1 from the second digit on each line.
I've tried
while (list ($key, $value) = each ($response)) {
but I get the error:
Warning: Variable passed to each() is not an array or object
Please someone, what am I doing wrong??
Admittedly, I'm more used to MySQL stuff so rarely encounter this sort of thing, any help REALLY appreciated.