Jump to content

Stripping Submit from Array


dennismonsewicz

Recommended Posts

I have a web form and upon submission I append all the $_POST values to an array but it is capturing the submit $_POST value...

 

Is there anyway to strip that out of the array?

 

Here is my code so far:

 

$array = array();

foreach($_POST as $k => $v) {
	unset($_POST[array_search("submit", $_POST)]);
	$array[$k] = $v;
}

echo '<pre>';
print_r($array);
echo '</pre>';

 

When I look at my results I am still seeing the submit post in the array

Link to comment
https://forums.phpfreaks.com/topic/194147-stripping-submit-from-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.