2013-07-02 21 views
-3

我如何能夠回顯下一個數組的個別值我可以告訴我,我設法爲每個循環回顯所有值,但我想要個別值,因爲我需要將它們插入數據庫。 Thxn提前。Echo個人陣列值

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

回答

0

只需提供關鍵...

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

1

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

錯,你不提供索引時鍵締合的值(鍵=>值) –

+0

是的,我剛剛注意到,編輯 –

+0

這是我的錯誤也提供索引。 thnx它的工作 –