Search
 
SCRIPT & CODE EXAMPLE
 

PHP

json encode decode

$json = '{"a":1,"b":2,"c":3}';
var_dump(json_decode($json)); //converts json to array

$array = [ "a" => 1, "b" => 2, "c" => 3];
echo json_encode($json_encode($json)); //converts array to json
Comment

json decode

$json = '{"courseList":[  
            {"course":"1", "course_data1":"Computer Systems(Networks)"},  
            {"course":"2", "course_data2":"Audio and Music Technology"},  
            {"course":"3", "course_data3":"MBA Digital Marketing"}  
        ]}';
var_dump(json_decode($json));
Comment

PREVIOUS NEXT
Code Example
Php :: shortcode php wordpress 
Php :: setup cron on macos for laravel 
Php :: check if file empty php 
Php :: carbon check if date is greater 
Php :: fast excel export laravel 
Php :: hide add new link on cpt page 
Php :: php use function from same class 
Php :: multi condition inside single if in php 
Php :: laravel apiresource 
Php :: display image from mysqli database 
Php :: wordpress deactivate widgets gutenberg 
Php :: show image laravel 
Php :: in_array validation laravel 
Php :: laravel foreign 
Php :: 301 redirect 
Php :: upload multiple images in php 
Php :: throwable php 
Php :: wp_list_pluck 
Php :: date format with t and z php 
Php :: strict types php 
Php :: laravel custom validation message 
Php :: php check valid json string 
Php :: cookies php syntax 
Php :: Custom Font Laravel 
Php :: get all post 
Php :: wordpress remove taxonomy from post 
Php :: carbon between hours 
Php :: laravel Impossible to create the root directory 
Php :: php regex replace to remove special characters and accented 
Php :: curl error (code 3) url malformed laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =