The usual way to do this in PHP is to put id[]
in your URL instead of just id
:
http://link/foo.php?id[]=1&id[]=2&id[]=3
Then $_GET['id']
will be an array of those values. It’s not especially pretty, but it works out of the box.
More Related Contents:
- Php condition doesn't work for html [closed]
- Using while in for loop (PHP) [closed]
- Im trying to create some temporary tables in mysql using php
- Divide php echo rows into 3 columns
- How do you parse and process HTML/XML in PHP?
- How can I create friendly URLs with .htaccess?
- Is there an easy way to convert a number to a word in PHP?
- “The page has expired due to inactivity” – Laravel 5.5
- How do I show multiple recaptchas on a single page?
- PHP Foreach Pass by Reference: Last Element Duplicating? (Bug?) [duplicate]
- Why does the PHP json_encode function convert UTF-8 strings to hexadecimal entities?
- Convert latin1 characters on a UTF8 table into UTF8
- PHP DOMDocument failing to handle utf-8 characters (☆)
- in_array multiple values
- if statement in the middle of concatenation? [closed]
- `static` keyword inside function?
- Initialize class property with an anonymous function
- How do I use cookies across two different domains?
- PHP Error : Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` [duplicate]
- Php – Your PHP installation appears to be missing the MySQL extension which is required by WordPress
- PHP: Check if variable exist but also if has a value equal to something
- How to remove the leading character from a string?
- get_headers Inconsistency [closed]
- Stop data inserting into a database twice
- Dynamic Comparison Operators in PHP
- MySQL GROUP BY and Fill Empty Rows
- How do I get the function name inside a function in PHP?
- How to remove an HTML element using the DOMDocument class
- Conditionally add associative element to array
- PHP Get Content of HTTP 400 Response