Skip to content
WJunction - Webmaster Forum

vB4 How to fix PHP 5 and array_merge errors

Status
Not open for further replies.
[Fix How to] PHP 5 and array_merge errors

http://www.vbulletin.org/forum/showthread.php?t=125302
Code:
$var = 'option1';
$array = array('option2', 'option3', 'option4');

$array = array_merge($var, $array);  

----------------

$var = 'option1';
$array = array('option2', 'option3', 'option4');

$array = array_merge((array)$var, $array);

Might help someone, or just posting as a reference for myself in future
 
Status
Not open for further replies.

About the author

E
Active Member · Joined
Where...ZZ
754
Messages
4
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom