I need to add values from an array and compare them with a value coming from a variable.
Ex:
array(1000, 1000, 3000, 5000,);
$var = 4000;
In the case you must add 1000 + 3000 in the array, then you will find the 4000. The array positions will be random, the sum can be between 2,3,4, .. values.
Is it possible only with php?