php数组显示没有工作 [英] php array display no working
问题描述
从帖子中获取数组后,数组不会显示我想要的方式。
从提交表单调用displeArray($ key)后该函数返回一个这样的数组:
数组([return] =>数组([产品] => 6546 [用户] => 4545 [activation_date] => 1363629173 [expiration_date] => 1426701173 [serial_status_id] => 1 [package_id] =>> 9999))
但我想让它显示进入一个好看的方式,我尝试了foreach循环但没有工作。
函数runVerifyKey($ client)
{
$ clients = verifyKey($ client);
foreach($ customers as $ key => $ value)
{
$ generated。= $ clients [$ key] => $ value;
echo $ generated;
}
}
Doesn从提交表单中运行。
After getting the array from a post, the array won''t display the way I want.
After calling displeArray($key) from a submit form the function return me a array like this:
Array ( [return] => Array ( [product] => 6546 [users] => 4545 [activation_date] => 1363629173 [expiration_date] => 1426701173 [serial_status_id] => 1 [package_id] => 9999 ) )
But I want it to display into a good looking way, I had try foreach loop but no working.
function runVerifyKey($client)
{
$clients = verifyKey($client);
foreach($clients as $key => $value)
{
$generated .= $clients[$key] => $value;
echo $generated;
}
}
Doesn''t work.
推荐答案
key)函数返回一个如下数组:
数组( [return] =>数组([product] => 6546 [users] => 4545 [activation_date] => 1363629173 [expiration_date] => 1426701173 [serial_status_id] => 1 [package_id] => 9999 ))
但是我希望它以漂亮的方式显示,我尝试了foreach循环但没有工作。
函数runVerifyKey(
key) from a submit form the function return me a array like this:
Array ( [return] => Array ( [product] => 6546 [users] => 4545 [activation_date] => 1363629173 [expiration_date] => 1426701173 [serial_status_id] => 1 [package_id] => 9999 ) )
But I want it to display into a good looking way, I had try foreach loop but no working.
function runVerifyKey(
client)
{
client)
{
clients = verifyKey(
clients = verifyKey(
这篇关于php数组显示没有工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!