I printed array witch is sent by Xcode using following code in php
$handle = fopen('php://input','r');
$jsonInput = fgets($handle);
$decoded = json_decode($jsonInput,true);
print_r($decoded);
This is how array looks like when printed:
Array
(
[json] => Array
(
[0] => Array
(
[price] => 380
[name] => SPICY TANDOORI CHICKEN
[desc] => Toasted sesame seed bun with grilled tandoori marinated chicken, onions, capsicums topped with cheese and mayo. Served with french fries
)
[1] => Array
(
[price] => 380
[name] => SPICY TANDOORI CHICKEN
[desc] => Toasted sesame seed bun with grilled tandoori marinated chicken, onions, capsicums topped with cheese and mayo. Served with french fries
)
[2] => Array
(
[price] => 380
[name] => SPICY TANDOORI CHICKEN
[desc] => Toasted sesame seed bun with grilled tandoori marinated chicken, onions, capsicums topped with cheese and mayo. Served with french fries
)
)
)
I want to add this array to mysql database. how can I insert. help me :(