小编A.H*_*bbs的帖子

如何在一行上打印一个数组

我已经搜索了答案,但都没有直接相关的答案,或者我无法对其进行调整以解决我的问题

我如何在一行中打印以下内容

<?php

$product_array = array("id"=>001, "description"=>"phones", "type"=>"iphone");


print "Print the product_array = ";
print_r($product_array);

?>
Run Code Online (Sandbox Code Playgroud)

当前结果

打印product_array = Array

[id] => 001

[说明] =>手机

[类型] => iphone

想要的结果

打印product_array = Array([id] => 001 [description] =>手机[type] => iphone)

html php arrays

3
推荐指数
3
解决办法
5180
查看次数

标签 统计

arrays ×1

html ×1

php ×1