在数组中访问PHP数组

时间:2011-08-06 17:50:21

标签: php

如何访问数组中的电子邮件值。

我需要将电子邮件值传递给$ email变量

输出:

params Array (
    [accountid] => 
    [serviceid] => 
    [domain] => 
    [username] => 
    [password] => 
    [packageid] => 
    [pid] => 
    [serverid] => 
    [customfields] => Array
        (
            [Cusom Field] => 
        )

    [configoptions] => Array
        (
        )

    [type] => 
    [producttype] => 
    [moduletype] => 
    [configoption1] => 
    [configoption2] => 
    [configoption3] => 
    [configoption4] => 
    [configoption5] => 
    [configoption6] => 
    [configoption7] => 
    [configoption8] => 
    [configoption9] => 
    [configoption10] => 
    [configoption11] => 
    [configoption12] => 
    [configoption13] => 
    [configoption14] => 
    [configoption15] => 
    [configoption16] => 
    [configoption17] => 
    [configoption18] => 
    [configoption19] => 
    [configoption20] => 
    [configoption21] => 
    [configoption22] => 
    [configoption23] => 
    [configoption24] => 
    [clientsdetails] => Array
        (
            [userid] => 
            [id] => 
            [firstname] => 
            [lastname] => 
            [companyname] => 
            [email] => 
            [address1] => 
            [address2] => 
            [city] => 
            [state] => 
            [postcode] =>
            [country] => 
            [countryname] => 
            [phonenumber] => 
            [notes] => 
            [password] => 
            [currency] => 
            [cctype] => 
            [cclastfour] => 
            [securityqid] => 
            [securityqans] => 
            [groupid] => 
            [status] => 
            [credit] => 
            [taxexempt] => 
            [latefeeoveride] => 
            [overideduenotices] => 
            [language] => 
            [lastlogin] => 
            [customfields1] => 
            [customfields2] => 
            [customfields3] => 
            [customfields4] =>
            [customfields5] => 
            [customfields6] => 
            [billingcid] => 
        )

    [server] => 
    [serverip] => 
    [serverhostname] => 
    [serverusername] => 
    [serverpassword] => 
    [serveraccesshash] => 
    [serversecure] => 
)

2 个答案:

答案 0 :(得分:3)

$email = $array['clientsdetails']['email'];

答案 1 :(得分:2)

 $email=$arr['clientsdetails']['email']