Php 回显单个数组值

Php 回显单个数组值,php,Php,我如何回显下一个数组的单个值我是gna post。有人能告诉我,我用for each循环回显了所有值,但我需要单个值,因为我需要将它们插入数据库。 提前通知我 global $ax_attributes; $ax_attributes = array( 'fullname' => array( 'scheme' => 'http://axschema.org/namePerson', 'text' => 'Celé jmén

我如何回显下一个数组的单个值我是gna post。有人能告诉我,我用for each循环回显了所有值,但我需要单个值,因为我需要将它们插入数据库。 提前通知我

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
    ),
范例

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

只要提供钥匙


echo$ax_属性['nick']['scheme']

错了,当键是关联值(key=>value)时,您不提供索引是的,我刚刚注意到,编辑是的,提供索引也是我的错误。thnx它起作用了