Skip to content

Instantly share code, notes, and snippets.

View joshbmarshall's full-sized avatar

Josh Marshall joshbmarshall

View GitHub Profile
@joshbmarshall
joshbmarshall / gist:6517321
Last active December 22, 2015 19:08 — forked from Shagshag/gist:5849065
Original gist would not work if a string had a character like : in it. Modified so that it would assign as a number if numeric otherwise assign as a string (escaping double quotes)
<?php
/**
* do the same than parse_str without max_input_vars limitation
* @param $string array string to parse
* @return array query parsed
**/
function my_parse_str($string) {
$result = array();
// find the pairs "name=value"