How can I turn a string below into an array?
pg_id=2&parent_id=2&document&video
This is the
This is one-liner for parsing query from current URL into array:
parse_str($_SERVER['QUERY_STRING'], $query);