D
D
Danil2021-07-16 17:05:14
PHP
Danil, 2021-07-16 17:05:14

How to check if multiple variables match?

There are variables

$var1 = 22687;
$var2 = 22687;
$var3 = 54464;

You need to find a number that matches several times
and print it

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim, 2021-07-16
@Deletron247

$array = [22687, 22687, 22688];
$result = array_count_values($array);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question