我只是想知道我是否可以从下面的代码中获取密钥
$keys = array_keys($_POST); //this will return all key
$key = array_key($_POS['username']) //i dont know this this is possible, im trying to get the 'username'
Run Code Online (Sandbox Code Playgroud)
可能吗?
对于单个键:
list($key) = array_keys($_POST);
Run Code Online (Sandbox Code Playgroud)
要么
reset($_POST);
$key = key($_POST);
Run Code Online (Sandbox Code Playgroud)