Home >Backend Development >PHP Tutorial >Order desc,ID desc怎么转为数组?

Order desc,ID desc怎么转为数组?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 13:28:031501browse

array('Order'=>'Desc','ID'=>'Desc') 转成这种格式


回复讨论(解决方案)

这个问题没看懂。

我也看不懂

parse_str(preg_replace(array('/\s+/', '/,/'), array('=', '&'), 'Order desc,ID desc'), $a);var_export($a);
array (  'Order' => 'desc',  'ID' => 'desc',)

学习 @xuzuning 大

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn