Jump to content

Foreach $_GET


conker87

Recommended Posts

Every $_GET value is passed through my sanitising function, however, I'm having to make variables for every time I use it. Could I use the foreach function? I can't test any code I make at the minute since I'm at work.

 

Ex:

<?php

foreach($_GET as $getName => $getValue)
{
	$_GET = san($getValue);
}

?>

Would this work?

Link to comment
https://forums.phpfreaks.com/topic/100470-foreach-_get/
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.