I want to create a NSArray witch contains the content of a MySQL table row
I use a php script to get the data
$response = $bdd->query('SELECT * FROM iPhoneTests');
while ($datas = $response->fetch())
{
?>
<array>
<integer><?php echo $datas['Temperature']; ?></integer>
</array>
<?php
}
and to test Iuse this code in my app
NSURL *getTemperature = [NSURL URLWithString:@"myURL..."];
NSError* error;
temperature = [NSArray arrayWithContentsOfURL:getTemperature ];
NSLog(@"%@",temperature);
When I test in my web broswer I get all my datas but in my app, with the NSlog I only get the first value.
I on this problem since a few time, but I can’t succeed
If someone see my mistake please tell me
You are creating an array for each row (which by the way is invalid, because those arrays would have to be nested into an array, too).
Do it in this way: