Log in

View Full Version : Help converting from php 4 to php 5 (array_merge problem)


jasharen
09-13-2007, 01:29 AM
Anyone out there know how to fix the array_merge change with PHP 5.0?

I know why I am running into the problem, I was using array_merge to merge several variables, along with several arrays.

I have tried array_push, but either I'm using it wrong (very possible) or it won't do exactly what I'm trying to do.

array_push($result, //result is an actual array
$vbulletin->GPC['LSTPER'], //actual array
$vbulletin->GPC['LSTREQUIRED'],//actual array
$vbulletin->GPC['CBOTYPE'], //UINT
$vbulletin->GPC['CBOINFOTYPE'],//UINT
$vbulletin->GPC['CBOTIMEZONE'], //UINT
$vbulletin->GPC['LSTINFO'] //UINT
);

Any suggestions on how to fix this to work like the array_merge from PHP 4.0 would be highly apreciated. :)

Dismounted
09-13-2007, 07:14 AM
array_merge($result, $vbulletin->GPC['LSTPER'], $vbulletin->GPC['LSTREQUIRED'], array($vbulletin->GPC['CBOTYPE'], $vbulletin->GPC['CBOINFOTYPE'], $vbulletin->GPC['CBOTIMEZONE'], $vbulletin->GPC['LSTINFO']));

jasharen
09-13-2007, 06:46 PM
Thanks Dismounted, I'll give that a try tonight!