I have array with numbers and variable number:
$a = array(1,2,3,4,5,6,7,8,9,10);
$v = 5;
I need result all numbers if is higher as $v:
$result = ?? //array(6,7,8,9,10)
I have array with numbers and variable number:
$a = array(1,2,3,4,5,6,7,8,9,10);
$v = 5;
I need result all numbers if is higher as $v:
$result = ?? //array(6,7,8,9,10)
<?php
$a = array(1,2,3,4,5,6,7,8,9,10);
$v = 5;
foreach($a as $value){
if($value > $v ){
$new[] = $value;
}
}
echo "<pre>";
print_r($new);