On Wed, 06 Jul 2005 15:45:56 -0400, Bob Stearns <rs**********@charter.net>
wrote:
In a note on 31-Jul-2002 added to the unshift function the writer
stated that array2=arrray1+array2 was equivalent to
unshift(arrayw,list(array1)). My php seems to take strong objection to
this [Fatal error: Unsupported operand types in
/var/www/html/GEM/etFlush/embryo_newFrozen.php on line 417].
Works for me. Post a minimal test script.
Am I doing something wrong?
Don't know, can't see your code.
Was the original poster on something?
Works for me on 5.0.4.
Is this a version problem?
Don't know, what's your version?
The following code produces that error:
<?php
$arrayone = array("newkey"=>"newvalue") + $arrayone;
var_dump($arrayone);
?>
... because $arrayone is not defined and so isn't an array.
The following works as required:
<?php
$arrayone = array();
$arrayone = array("newkey"=>"newvalue") + $arrayone;
var_dump($arrayone);
?>
--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool