dimanche 28 février 2016

wordpress json_decode is not working, I am trying to get value form wp_option table , please help me

/* when I am trying decode json with this code I output is ArrayArray ( [0] => ) I do not why wordpress does not supporting, */

 <?php
    global $wpdb;
    $mylink = $wpdb->get_results( "SELECT option_value FROM wp_options WHERE option_id=62167", ARRAY_N );
    $raw = stripslashes_deep($mylink);
            $data = array();
            foreach ($raw as $json) {
                        echo $json;

                $item = @json_decode($json, true);

                $data[] = $item;enter code here

                            print_r($data);

            }
    ?>
    enter code here



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire