我知道必须有一种简单有效的方法来做到这一点。
我有一个这样的数组:
$fields = array( "EVENT_ID" => "Event Id" ,
"EVENT_NAME" => "Name",
"EVENT_CLASSIFICATION" => "Classification",
"DESCRIPTION" => "Description",
"START_TIME" => "Start Time",
"END_TIME" => "End Time"
);
我想将其转换为以下查询:
Select
"EVENT_ID" as "Event ID",
"EVENT_NAME" as "Name",
...
from
...
不想把它放在循环中。PHP 有很多数组处理函数,这一定很容易。我是 php 新手。
有任何想法吗?