Cep Posted November 10, 2006 Share Posted November 10, 2006 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 More sharing options...
Vikas Jayna Posted November 10, 2006 Share Posted November 10, 2006 use the array_merge() function. Link to comment https://forums.phpfreaks.com/topic/26822-array-merging/#findComment-122648 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.