Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #14977

Re: 4d assoc array access

From Denis McMahon <denismfmcmahon@gmail.com>
Newsgroups comp.lang.php
Subject Re: 4d assoc array access
Date 2015-02-25 15:33 +0000
Organization A noiseless patient Spider
Message-ID <mckq0o$gmo$3@dont-email.me> (permalink)

Show all headers | View raw


For some reason, every time I try and reply to the original post the 
message disappears.

On Mon, 23 Feb 2015 00:09:40 -0800 (PST) Adnan Shiekh 
<adnanshahi123@gmail.com> wrote:

> I have a question how to access 4 dimesional array efficiently in php

1) Your JSON is broken.

2) If you want json_decode to create an associative array in php you need 
to set the right options in the call to json_decode. Read the php manual 
for the json_decode function.

3) To access 'hello2' in the associative array generated from the 
corrected json data, use:

$result['output']['data'][1]['password']

-- 
Denis McMahon, denismfmcmahon@gmail.com

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: 4d assoc array access Denis McMahon <denismfmcmahon@gmail.com> - 2015-02-25 15:33 +0000
  Re: 4d assoc array access Albertestein <adnanshahi123@gmail.com> - 2015-02-25 19:44 -0800

csiph-web