如何显示个人价值?

时间:2012-02-17 06:21:33

标签: php

我是从print_r($data)得到的:

Array (
  [0] => Array (
    [0] => stdClass Object (
      [cto_office_id] => 1
      [office_name] => Airtel India
      [address_line1] => Bendoor well
      [phone_office1] => 12345678912
      [phone_office2] => 789451234512
      [address_line2] => Kankanady Circle
      [city] => Mangluru
      [state] => Haryana
      [pin_code] => 002
      [country] => India
      [web_url] => airte.co.in
      [office_quote] => Office
      [date_registered] => 2011-11-24 05:59:51
      [bill_mail_id] => 15612561
      [bill_mail_id_type] =>
      [acc_status] => enabled
      [comments] =>
      [is_account_deleted] => 0
      [account_deleted_date] => 0000-00-00 00:00:00
    )
  )
)

我尝试了这个$data['phone_office1'],但这不起作用。

1 个答案:

答案 0 :(得分:1)

您有一个嵌套在两个数组中的对象。你可以这样得到它:

$data[0][0]->phone_office1