Answer the question
In order to leave comments, you need to log in
How to find the missing elements of an array?
There is an array like:
array(3000) {
[0]=>
int(3000)
[1]=>
int(2999)
[2]=>
int(2998)
[3]=>
int(2997)
.....
}
Answer the question
In order to leave comments, you need to log in
$array = [...]; // ваш исходный массив
$array_full = range(min($array), max($array)); // эталонный массив
$array_diff = array_diff($array_full, $array); // пропущенные значения
$myArray = [];
for($i = 0; $i < 3000; $i++){
if(!isset($array[$i])) {
$myArray[] = $i;
}
}
foreach ($array as $key => $value) {
$value = trim($value);
if (empty($value))
echo "$key empty <br/>";
else
echo "$key not empty <br/>";
}
Read about translate3d in CSS. Very easy to do.
Example: theory.phphtml.net/css/translate3d.html
On pure JS, without CSS3 - something like this
. Accordingly, you can change the function of the motion trajectory to the required one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question