0
我正在開發一個應用程序,因爲我曾經通過WebServices將我的聯繫號碼發送到服務器。在這裏,我得到了我的聯繫人號碼數組,但是如何將我的聯繫人數組發送到for- loop.Here服務鏈接。通過數組元素循環
http://project.in/project-contacts.php
參數contact_numbers[]
這裏下面我試圖代碼
NSString *postVarArrayString = @"";
NSString *separator = @"?";
for (int i=0; i<[_numberArray count]; i++) {
if (i>0) {
separator = @"&";
}
postVarArrayString = [NSString stringWithFormat:@"%@%@myArray[]=%ld", postVarArrayString, separator, (long)[[_numberArray objectAtIndex:i] integerValue]];
}
// url
NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:
@"http://project.in/project-contacts.php"
@"%@"
, postVarArrayString]
];
NSLog(@"qq=%@", [url absoluteString]);
在這裏,我怎樣才能WebServices.Can送我的聯繫人的陣列請你建議我我如何發送,謝謝。
將整個數組發送到服務器。讓服務器端腳本完成這項工作。 –