A
A
alexandrto2020-04-22 20:48:17
PHP
alexandrto, 2020-04-22 20:48:17

How to store and compare for validity more than 300 values ​​of $_GET parameters for comparison?

Good evening, tell me how to store and compare >300 values ​​with the values ​​returned from the $_GET parameters. To further give links formed from values.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2020-04-22
@Rsa97

$parameter1_variants = [
  'variant1', 'variant2', 'variant3', ..., 'variant300'
];
...
if (in_array($_GET['parameter1'], $parameter1_variants)) {
  ...
}

F
FanatPHP, 2020-04-22
@FanatPHP

In the database

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question