如何在PHP中发送数组从IOS APP发送到PHP

i am sending an images array from ios app to php server.at php i am getting a string containg data instead of array. how to i get array sent from ios in php.

here is my IOS CODE:

NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@questionaire/SaveQuestionaireAnswer", OtherBaseServerURL]];
    NSLog(@"submit ans url : %@", url);
    NSMutableURLRequest *request = [[NSMutableURLRequest alloc] init];
    [request setURL:url];
    [request setHTTPMethod:@"POST"];

    NSString *boundary = @"--------------------BOUNDARY----------------------";
    NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",boundary];
    [request addValue:contentType forHTTPHeaderField: @"Content-Type"];

    NSMutableData *body = [NSMutableData data];

    [body appendData:[[NSString stringWithFormat:@"
--%@
",boundary] dataUsingEncoding:NSUTF8StringEncoding]];

    // userId
    [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"userid\"

%@", [[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithFormat:@"
--%@
",boundary] dataUsingEncoding:NSUTF8StringEncoding]];

    // answer
    [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"answer\"

%@", choiceStr] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithFormat:@"
--%@
",boundary] dataUsingEncoding:NSUTF8StringEncoding]];

    //answere mail
    [body appendData:[[NSString stringWithFormat:@"Content-Disposition: form-data; name=\"images\"

%@", ansArray] dataUsingEncoding:NSUTF8StringEncoding]];
    [body appendData:[[NSString stringWithFormat:@"
--%@
",boundary] dataUsingEncoding:NSUTF8StringEncoding]];

    // setting the body of the post to the reqeust
    [request setHTTPBody:body];

    NSLog(@"request str - %@",[[NSString alloc]initWithData:body encoding:NSASCIIStringEncoding]);

    // now lets make the connection to the web
   submitAnsConnection = [NSURLConnection connectionWithRequest:request
                                                     delegate:self];

Here is my PHP code:

$answer=trim($this->input->post('answer'));
$images=$this->input->post('images');
echo "<pre> w/o json decode";  print_r($images); echo "</pre>";

Here is my response in php:Array ( [userid] => 165 [answer] => women [images] => ( "img2.png", "img4.png", "img5.png", "img7.png" ) )

and if i check length of array images i get result 1 instead of 4.

<?php  echo sizeof($images) ?> i am returned 1.