クエリ文字列を多次元配列に解析する関数が必要です。クエリ文字列は次のようになります。
?fields=incidents:(id,shortdescription,action,request);people:(unid,name)&format=json
返される配列は次のようになります。
array(
'fields' => array(
'incidents' => array(
'id',
'shortdescription',
'action',
'request'
),
'people' => array(
'unid',
'name'
),
),
'format' => 'json'
);
セパレーターを動的にしたいので、次のような配列に配置します。
$separators = array(';', ':', ',');
この配列内の区切り文字の順序によって、クエリ文字列が解析される順序が決まります。
誰かがこのような便利なものを持っていますか?
よろしく、
マーク