[ create a new paste ] login | about

Link: http://codepad.org/9bUixf9z    [ raw code | output | fork ]

PHP, pasted on Oct 2:
1
2
3
4
5
6
7
<?php

$fruit = array('banana','apple','tangerine','orange','lemon','lime','kiwi','mango','guava');
$citrus = array('orange','lemon','lime','tangerine', 'clementine');

$others = array_diff($fruit, $citrus);
var_dump($others);


Output:
1
2
3
4
5
6
7
8
9
10
11
12
array(5) {
  [0]=>
  string(6) "banana"
  [1]=>
  string(5) "apple"
  [6]=>
  string(4) "kiwi"
  [7]=>
  string(5) "mango"
  [8]=>
  string(5) "guava"
}


Create a new paste based on this one


Comments: