0

I'm using krumo to output data from a page, all the data is accessible through the $page variable. I have a field called customer with the following structure:

customer (Array, 1 element) 
    0 (Array, 1 element) 
        id (String, 2 characters ) 85

How do i actually access id? I've tried $page->customer->id but it doesn't work. On the same level as customer, there's a string field called foo which I can access using $page->foo - so why doesn't my approach work?

Ja͢ck
  • 170,779
  • 38
  • 263
  • 309
thatsCheating
  • 105
  • 1
  • 1
  • 3

1 Answers1

0

If I'm not misunderstanding your question your solution would be:

$id=$page->customer[0]['id'];

A print_r() version would help too, maybe

lamas
  • 4,528
  • 7
  • 38
  • 43