What do you want to save?
Add Code snippet
New code examples
-
PHP 2022-03-17 22:55:27
web api return json example in php
$option = $_GET['option']; if ( $option == 1 ) { $data = [ 'a', 'b', 'c' ]; // will encode to JSON array: ["a","b","c"] // accessed as example in JavaScript like: result[1] (returns "b") } else { $d... Add solution -
PHP 2021-11-21 14:01:06
php create json as request for call another api
$option = $_GET['option']; if ( $option == 1 ) { $data = [ 'a', 'b', 'c' ]; // will encode to JSON array: ["a","b","c"] // accessed as example in JavaScript like: result[1] (returns "b") } else { $d... Add solution