Jump to content

Array merging


Cep

Recommended Posts

Hello,

Just a quick question really but is this correct?

[code=php:0]
$file1 = array();
$file2 = array();
$filearray = $file1 + $file2;

// $filearray = array($file1, $file2);
[/code]

Its just that on a part of my code I have a setup like this but I can never echo $file2, I am wondering if this is because the value isnt being written or whether my assumption of using $filearray = $file1 + $file2 to add two arrays as values to another is actually incorrect.
Link to comment
https://forums.phpfreaks.com/topic/26822-array-merging/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.