• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 242
  • Last Modified:

PHP Array's Question

I was able to get the values from a database to an array in PHP. How do I access them now?

Array 
([0] => Array ( [class] => PREMIER [name] => B Reach ) 
[1] => Array ( [class] => PREMIER [name] => B Touch ) 
[2] => Array ( [class] => PREMIER [name] => B Identity ) 
[3] => Array ( [class] => PREMIER [name] => B Marq) 
[4] => Array ( [class] => ADVANTAGE [name] => B Linq ) 
[5] => Array ( [class] => ADVANTAGE [name] => B Touch 91 ) 
[6] => Array ( [class] => ADVANTAGE [name] => B Marq 91 ) )
 
 
I tried 
 
echo $array[0][0] but I dont get any display

Open in new window

0
mkirtani
Asked:
mkirtani
1 Solution
 
mkirtaniAuthor Commented:
I got it.

echo $parray[0]["class"];
echo $parray[0]["name"];
      
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now