webdevRefinery Forum: pakbron - Viewing Profile - webdevRefinery Forum

Jump to content

Reputation: 0 Neutral
Group:
Members
Active Posts:
28 (0.02 per day)
Most Active In:
PHP (11 posts)
Joined:
12-March 10
Profile Views:
1675
Last Active:
User is offline Oct 07 2012 08:08 PM
Currently:
Offline

My Information

Age:
24 years old
Birthday:
May 29, 1988
Gender:
Not Telling Not Telling
Expertise:
HTML
CSS
PHP
Javascript
SQL
Flash

Contact Information

E-mail:
Private

Latest Visitors

  • Photo Qasim 
    14 Jun 2012 - 17:43
  • Photo Marked 
    15 Jun 2011 - 19:16
  • Photo dida 
    06 May 2010 - 07:02

Posts I've Made

  1. In Topic: JSON Decode Trouble

    05 October 2012 - 03:42 PM

    soulcyon, on 05 October 2012 - 02:06 PM, said:

    http://jsonlint.com/ is my best friend, and he says you are missing the last "}"

    If you want to decode Json string to PHP, you should try using
    json_decode($string, true)
    . the STD-Class comes because the "true" flag is not set on json_decode

    Here's a sample:

    $data = json_decode('{"test" : "WAZAA"}', true);
    
    echo $data["test"]; // echos out WAZAA
    
    


    Ok. I was missing one "}" Thx for that.

    I have something like this in my class to read
    public $archivo = "";
        public $archivoJson = "";
        public $json;
        /* Carga los datos del JSON a la clase */
        function class_JSON($archivo_abrir)
        {
            try{
                //Se guarda el archivo
                $this->archivo = $archivo_abrir;
                //Se lee el archivo 
                $conexionArchivoJson = fopen($this->archivo, 'r');
                $this->archivoJson =fread($conexionArchivoJson,filesize($this->archivo)); 
                fclose($conexionArchivoJson);
                $this->json = json_decode($this->archivoJson);
            }catch(Exception $e){
                
            }
        }
    


    Now I need to read everything else. I want to manipulate that structure. I cant do it now :/
    Do you have any idea to manipulate the child nodes?? names, id, values?

Friends

pakbron hasn't added any friends yet.

Comments

pakbron has no profile comments yet. Why not say hello?


Enter your sign in name and password


Sign in options
  Or sign in with these services