How to print a specific value in array in PHP?

Posted by cateye on Stack Overflow See other posts from Stack Overflow or by cateye
Published on 2010-05-03T22:01:05Z Indexed on 2010/05/03 22:08 UTC
Read the original article Hit count: 196

Filed under:
|
|
array(2) {
  [0]=>
  object(stdClass)#144 (7) {
    ["id"]=>
    string(1) "2"
    ["name"]=>
    string(8) "name1"
    ["value"]=>
    string(22) "Lorem Ipsum Dolar Amet"
    ["type"]=>
    string(8) "textarea"
    ["group"]=>
    string(1) "1"
    ["published"]=>
    string(1) "1"
    ["ordering"]=>
    string(1) "1"
  }
  [1]=>
  object(stdClass)#145 (7) {
    ["id"]=>
    string(1) "4"
    ["name"]=>
    string(6) "Link1"
    ["value"]=>
    string(36) "abcabcab"
    ["type"]=>
    string(4) "link"
    ["group"]=>
    string(1) "1"
    ["published"]=>
    string(1) "1"
    ["ordering"]=>
    string(1) "2"
  }
}

I want to print only "value" (abcabcab) of id=4. How can I achieve this?

© Stack Overflow or respective owner

Related posts about php

Related posts about array