NOTICE

Adfly Links not working Find Direct Links HERE

Get Multiple Url Parameters with Same Name Using PHP

index.php?paraname=VALUE1&paraname=VALUE2&paraname=VALUE3&paraname=VALUE4
Now if we get paraname parameter as follow $val = $_REQUEST['paraname']; // Output only last value VALUE4 we can bind all parameters in an array by doing a change in the form from where the values are coming like as follow

<form action="" method="get">
<input name="paraname[]">
<input name="paraname[]">
<input name="paraname[]">
<input name="paraname[]">
</form>

Then we can request the values as
<php

$val = $_REQUEST['paraname'];


foreach ($val as &$Mvalue) {
     
  echo $Mvalue."<br>"; 
 }
?>

0 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)