SHARE
TWEET

Untitled

a guest Jun 20th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $banana = '1,2,3,6,7';
  2.      
  3. $arr = range(1,7);// range in which you want to check
  4. $banana = '1,2,3,6,7';
  5. $bananaToArray = explode(',',$banana);
  6. $res = array_diff($arr, $bananaToArray);
  7. echo '<pre>';
  8. print_r($res);
  9.      
  10. Array
  11. (
  12.  [3] => 4
  13.  [4] => 5
  14. )
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top