EDIT reformulated question:
i am loading an image from a server with my iphone the following way.
NSURL *url = [NSURL urlWithString:@"http://www.example.de/getImage.php"];
NSData *data = [[NSData alloc] initWithContentsOfURL:url];
UIImage *im = [UIImage imageWithData:data];
imageView.image = im;
the php script ends with the line
$image = file_get_contents($direction);
echo $image;
everything is working here. i reveice the image. Now i wanted to receive two objects of the server and tried to change the script slightly:
echo array(0=>$image , 1=> $intValue);
i tried to read this data for hours now and don´t get a result. why doesn´t this try work?:
NSArray *arr = [[NSArray alloc] initWithContentsOfURL:url];
UIImage *im = [UIImage imageWithData:[arr objectAtIndex:0]];
while debugging i used NSLog to get the description of the image and it is (null).
There is no typo or compiling or syntax error...
EDIT001: Okay i got it now perhaps a little overkill but the way i tried is not possible in my opinion. i used json_encode and base64_encode again like this:
echo json_encode(array('a'=>base64_encode($image), 'b'=>$anotherObject));
on iphone side i used some frameworks to decode JSON and base64 again and it works... thank you and if you have questions on this write them down