Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use json_decode() function in php ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 285
    Comment on it

    Hi Reader's,
    Welcome to FindNerd, today we are going to discuss how to use json_decode() function in php ?

    So, Firstly let us know what is the use of json_decode() function ?
    So json_decode() function is basically used for converting JSON string to array object.

    you can see bellow example:

    <?php
    
    //here call your json data and stroe in a variable
    $jsondata = '{"name":"joe","phone_number":1234567890,"address":"awang"}';
    //here call json_decode() function for converint in a array object
    $arrdata=json_decode($jsondata);
    //here print $arrdata
    print_r($arrdata);
    
    ?>
    

    output will come following of above example

    stdClass Object ( [name] => joe [phone_number] => 1234567890 [address] => awang ) 
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: