我有 2 个数组,一个带有占位符,它们是另一个数组中的键
arr1 = array(
"id" => "{{verticalId}}",
"itemPath" => "{{verticalId}}/{{pathId}}/");
arr2 = array(
"verticalId" => "value1",
"pathId" => "value2");
那么我怎样才能运行arr1
并用来自的值替换占位符arr2
呢?