-3

我如何回显下一个数组的单个值,我是 gna 后有人可以告诉我,我设法用 for 每个循环回显所有值,但我想要单个值,因为我需要将它们插入数据库。提前谢谢。

global $ax_attributes;

$ax_attributes = array(
    'fullname' => array(
        'scheme'   => 'http://axschema.org/namePerson',
        'text'     => 'Celé jméno',
        'required' => FALSE
    ),
    'firstname' => array(
        'scheme'   => 'http://axschema.org/namePerson/first',
        'text'     => 'Jméno',
        'required' => TRUE
    ),
    'lastname' => array(
        'scheme'   => 'http://axschema.org/namePerson/last',
        'text'     => 'Příjmení',
        'required' => TRUE
    ),
    'nick' => array(
        'scheme'   => 'http://axschema.org/namePerson/friendly',
        'text'     => 'Přezdívka',
        'required' => FALSE
    ),
    'company' => array(
        'scheme'   => 'http://axschema.org/company/name',
        'text'     => 'Jméno společnosti',
        'required' => FALSE
    ),
    'h_address' => array(
        'scheme'   => 'http://axschema.org/contact/postalAddress/home',
        'text'     => 'Domácí adresa – Ulice',
        'required' => TRUE
    ),
    'h_address2' => array(
        'scheme'   => 'http://axschema.org/contact/postalAddressAdditional/home',
        'text'     => 'Domácí adresa – Ulice2',
        'required' => FALSE
    ),
    'h_address3' => array(
        'scheme'   => 'http://specs.nic.cz/attr/addr/main/street3',
        'text'     => 'Domácí adresa – Ulice3',
        'required' => FALSE
    ),
4

2 回答 2

1

例子

echo $ax_attributes['fullname']['scheme'];
于 2013-07-02T16:09:55.217 回答
0

只需提供密钥...

echo $ax_attributes['nick']['scheme'];

于 2013-07-02T16:11:36.860 回答