I get a response value from PHP code that goes like that:
"success, 32"
How can I display in NsLog the first part of the value before the - "," and the second part separately?
I get a response value from PHP code that goes like that:
"success, 32"
How can I display in NsLog the first part of the value before the - "," and the second part separately?
Break the string into an array of chunks:
NSArray *chunks = [string componentsSeparatedByString: @","];
then display the chunk you want:
NSLog(@"%@", chunks[0]);
or
NSLog(@"%@", chunks[1]);