Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- curl http://localhost:80/problem2.php -X POST -H Content-Type:application/json --data-binary "{'cells': [4,8,11,18,19], 'distance': 2}"
- $data = json_decode(file_get_contents('php://input'));
- --data-binary '{"cells": [4,8,11,18,19], "distance": 2}'
- var_dump(json_decode('{"cells": [4,8,11,18,19], "distance": 2}'));
- print_r($data->cells);
- Array
- (
- [0] => 4
- [1] => 8
- [2] => 11
- [3] => 18
- [4] => 19
- )
Add Comment
Please, Sign In to add comment