将数组值保存到变量PHP中

时间:2014-04-01 20:35:13

标签: php

我有一个数组Array ( [email] => pree@ipe.com [mobileNo] => 9999999999 )

如何存储

$email = 'pree@ipe.com'
$mobileNo = '9999999999'

变量键和值

1 个答案:

答案 0 :(得分:1)

试试extract

$input = array('email' => 'pree@ipe.com', 'mobileNo' => 9999999999);
extract($input);

var_dump($email, $mobileNo);

输出:

string 'pree@ipe.com' (length=12)
int 9999999999