note 95905 deleted from function.rawurldecode by danbrown

From: Date: Thu, 28 Jan 2010 13:24:04 +0000
Subject: note 95905 deleted from function.rawurldecode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-165431@lists.php.net to get a copy of this message
Note Submitter: vinayak ---- solution for parsing row post data <?php $strFormData = rawurldecode($_POST['formData']);/* row post data*/ if(isset($strFormData) && !empty($strFormData)) { $arrFormData = explode("&", $strFormData); $intCnt = count($arrFormData); if($intCnt > 0 ) { for($i=0;$i<$intCnt;$i++ ) { $x = explode('=', $arrFormData[$i]); /* if array */ if( strstr( rawurldecode($x[0]), '[') ) { $_POST[str_replace("[]", "", rawurldecode($x[0]))][] = str_replace("+", " ", rawurldecode($x[1])); } else { $_POST[rawurldecode($x[0])] = str_replace("+", " ", rawurldecode($x[1])); } } } } ?>

« previous php.notes (#165431) next »