Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $x = 100; // number to beat
- $input = array(0, 1, 2, 100, 500);
- $hasGreaterValue = false;
- array_walk($input, function($val, $key) use (&$hasGreaterValue) {
- if ($val > $x) $hasGreaterValue = true;
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement