Re: [PHP] json_encode/json_decode, take 2

2007-10-19 Thread Jochem Maas
try seeing what json_encode() creates: $json = "json"; $data = array( "no_1" => $json, "no_2" => $json, "no_3" => $json, "no_4" => array("foo" => $json, "bar" = $json), ); print_r({"{$json}_encode"}($data)); Christoph Boget wrote: > The string used below in "$myAr

Re: [PHP] json_encode/json_decode, take 2

2007-10-19 Thread Nathan Nobbe
On 10/19/07, Jochem Maas <[EMAIL PROTECTED]> wrote: > > Christoph Boget wrote: > > The string used below in "$myArrEncoded" is generated in javascript, > after > > creating the structure and spitting out: > > > > var JSONVar = javascriptVar.toSource(); > > > > I can eval JSONVar and work with it as

Re: [PHP] json_encode/json_decode, take 2

2007-10-19 Thread Jochem Maas
Christoph Boget wrote: > The string used below in "$myArrEncoded" is generated in javascript, after > creating the structure and spitting out: > > var JSONVar = javascriptVar.toSource(); > > I can eval JSONVar and work with it as I would be working with the original > javascriptVar so I know the

[PHP] json_encode/json_decode, take 2

2007-10-19 Thread Christoph Boget
The string used below in "$myArrEncoded" is generated in javascript, after creating the structure and spitting out: var JSONVar = javascriptVar.toSource(); I can eval JSONVar and work with it as I would be working with the original javascriptVar so I know the transition back and forth from a stru

[PHP] json_encode/json_decode

2007-10-19 Thread Christoph Boget
Please take a look at the following code and tell me what I'm doing wrong here. I'm just not understanding why this isn't working: array( 'Key 1 1' => array( array( 'Key 1 1 1' => 'Value' ), array( 'Key 1 1 2' => 'Value' )),