fork download
  1. <?php
  2.  
  3. $ranking[] = ['App', 'Views'];
  4.  
  5. $options[] = ['A', 'B'];
  6.  
  7. $merge = array_merge($ranking, $options);
  8. $merge2 = array_merge($ranking[0], $options);
  9.  
  10. var_dump($merge);
  11. var_dump($merge2);
Success #stdin #stdout 0.02s 52432KB
stdin
Standard input is empty
stdout
array(2) {
  [0]=>
  array(2) {
    [0]=>
    string(3) "App"
    [1]=>
    string(5) "Views"
  }
  [1]=>
  array(2) {
    [0]=>
    string(1) "A"
    [1]=>
    string(1) "B"
  }
}
array(3) {
  [0]=>
  string(3) "App"
  [1]=>
  string(5) "Views"
  [2]=>
  array(2) {
    [0]=>
    string(1) "A"
    [1]=>
    string(1) "B"
  }
}