0

If I want to store some values that I get from PHP file into NSArray what is the syntax should I use ?

I set my Array like: NSArray *Name; and i store values in the Array like: _Name = @[@"Tomer", @"Elad",@"Aviel"];

but if I want to store values the come from PHP page like that: "tomer,elad,aviel"

what is the syntax for it? I mean something like that:

NSString *NameValues;

_Name = @[NameValues];

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

You need to adopt a common communication method between PHP and Objective-C.

A popular choice for communication between multi-system is using JSON.

Why don't you generate the JSON with PHP and have your app decode it? Example json decode : https://stackoverflow.com/a/7794561/2332336

Community
  • 1
  • 1
Latheesan
  • 23,247
  • 32
  • 107
  • 201