note 34502 deleted from function.parse-str by tomsommer

From: Date: Tue, 31 Aug 2004 18:08:50 +0000
Subject: note 34502 deleted from function.parse-str by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-75758@lists.php.net to get a copy of this message
Note Submitter: nospam at fiderallalla dot de ---- This func does the job even with multidimensional arrays, f.e. for passing them with a link. function Fs_ReParseStr($vars) { $out = "/"; $snd = false; if ( !is_array($vars) || count($vars) == 0 ) { return $out; } $fga = func_get_args(); if ( isset($fga[1],$fga[2]) && $fga[1] === true ) { $snd = true; } foreach ( $vars as $key=>$val ) { if ( !is_array($val) ) { $out .= ( ($snd) ? $fga[2]."[".$key."]" : $key ); $out .= "=".rawurlencode($val)."&"; } else { $key = ( ($snd) ? $fga[2]."[".$key."]" : $key ); $out .= Fs_ReParseStr($val,true,$key); } } return $out; } Hans Kuhln

« previous php.notes (#75758) next »