I want to serialize all POST data from HTML form with PHP. I have tried with this code: serialize($_POST);
but as result I get serialized INPUT Names and Values together, I want to get serialized only Values of INPUT.

PHP序列化所有POST数据
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
1条回答 默认 最新
- douqi3064 2015-07-18 10:38关注
if you need to serialize only array values - use
array_values
function. After using this function you will have your array values, but keys will be numeric:serialize(array_values($_POST))
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报