All pastes #933295 Raw Edit

Something

public text v1 · immutable
·published 2008-03-08 06:55 UTC
rendered paste body
	public static function parseHtmlForm($req){
		//$req can be html or HttpRequest Object
		if($req instanceof HttpRequest) $body = (string) $req->body;
		else $body = $req;
		
		$parser =& new HtmlFormParser( $body );
		return $parser->parseForms();
	}
	
	public static function varsToArray($str){
		$arr = array();
		parse_str($str, $arr);
		return $arr;
	}