Reputation: 10111
html :
<input type="text" name="ps[part1['test']]" value="testing multiple array">
Current result :
[ps] => Array
(
[part1['test'] => testing multiple array
)
Expecting result :
[ps] => Array
(
[part1] => Array
(
[test] => 12:00
)
)
Last quote is being break somewhere
is there anything missing ?
Upvotes: 0
Views: 40
Reputation: 62556
You should use ps['part1']['test']
as the name of the input:
<input type="text" name="ps['part1']['test']" value="testing multiple array">
This way - when you POST
the data to PHP it will get into the $_POST['ps']
, create an array with the key part1
, and then create another key with the name test
inside $_POST['ps']['part1']
.
Upvotes: 3