Link.FYI

Pastebin

Create New My Pastes

Code (PHP) pasted on 2018-11-18, 21:15 Raw Source

  1. <?php
  2. $input = [
  3.     ["blue", "red", "green", "yellow"],
  4.     ["pink", "blue", "red"],
  5.     ["black", "pink", "yellow"]
  6. ];
  7.  
  8. $uniques = [];
  9. foreach ($input as $array) { $uniques = array_merge($uniques, $array); }
  10. $uniques = array_unique($uniques);
  11.  
  12. var_dump($uniques);