$a = Array (' A ', ' B '); $b = Array (' C ', ' d '); $c = $a + $b; Var_dump ($a); Var_dump (Array_merge ($a, $b)); Output: Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) 2 => string ' C ' (length=1) 3 => string ' d ' (length=1) ++++++++++++++++++++++++++++++++++++++++++
$a = Array ( 0 => ' a ', 1 => ' B ' ); $b = Array ( 0 => ' C ', 1 => ' B ' ); $c = $a + $b; Var_dump ($c); Var_dump (Array_merge ($a, $b)); Output: Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) 2 => string ' C ' (length=1) 3 => string ' B ' (length=1) ++++++++++++++++++++++++++++++++++++++++++ $a = Array (' A ', ' B '); $b = Array ( ' 0 ' => ' C ', 1 => ' B ' ); $c = $a + $b; Var_dump ($c); Var_dump (Array_merge ($a, $b)); Output: Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) 2 => string ' C ' (length=1) 3 => string ' B ' (length=1) ++++++++++++++++++++++++++++++++++++++++++ $a = Array ( 0 => ' a ', 1 => ' B ' ); $b = Array ( ' 0 ' => ' C ', ' 1 ' => ' B ' ); $c = $a + $b; Var_dump ($c); Var_dump (Array_merge ($a, $b)); Output: Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) Array 0 => string ' a ' (length=1) 1 => string ' B ' (length=1) 2 => string ' C ' (length=1) 3 => string ' B ' (length=1) |