我有 3 个数组,每个数组只有 7 个元素。数组是:
filename[]
title[]
description[]
我想为上面数组中的每个数据表达和迭代一个关联数组。filename
可以是 assoc 数组的键值,但每个文件名都有自己对应的标题和描述。
以下是以下示例:
var_dump($filename)
string(10) "IMG_1676_3" [1]=>
string(10) "IMG_0539_3" [2]=>
string(8) "IMG_1942" [3]=>
string(8) "IMG_1782" [4]=>
string(8) "IMG_2114" [5]=>
string(8) "IMG_9759" [6]=>
string(8) "IMG_2210" }
var_dump($title)
string(31) "Lighthouse at Ericeira Portugal" [1]=>
string(23) "Gaudi park in Barcelona" [2]=>
string(32) "Driving around outside of Lisbon" [3]=>
string(16) "Madeira Portugal" [4]=>
string(15) "Barcelona Spain" [5]=>
string(15) "Lisbon Portugal" [6]=>
string(14) "Sailing Lisbon" }