我有这个数组:
array (size=7)
'form' => string 'form-elements'
'device' => string 'computer'
'company' => string 'sdfsdf'
'Naam' => string 'sdfsdfs'
'phone' => string 'dfsdfsd'
'email' => string 'andrey6ssss13@gmail.comrty'
'mesaj' => string 'dasdasd'
我将$_SESSION
存储为每个键的另一个值($_SESSION['key from $_POST'.'_type']
),“type”,例如我需要序列化["company","sdfsdf","1"]
有没有办法生成数组像这样:
array (size=7)
'form' => string 'form-elements'
'device' => string 'computer'
'company' => array (
'sdfsdf'
'1'
)
'Naam' => array(
'sdfsdfs'
'0'
)
'phone' => array (
'dfsdfsd'
'3'
)
等
所以我有这个功能可以完成我需要但我必须采用不同的方法,我需要将$_POST
数组与$_SESSION['$_POST key'.'_type']
结合起来,以便为{{1}提供2个值}键
$_POST