You are here: Re: [PHP] Use of + with arrays « PHP « IT news, forums, messages
Re: [PHP] Use of + with arrays

Posted by "Richard Lynch" on 07/06/05 23:46

On Wed, July 6, 2005 12:43 pm, Bob Stearns said:
> 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]. Am I doing
> something wrong? Was the original poster on something? Is this a version
> problem?

Almost for sure a version "problem"

Way back in PHP/FI (aka PHP 2) you could use "+" to concatenate strings, I
do believe.

And, probably, somewhere along the way, you could use "+" to merge arrays
or something.

Both probably seemed like Good Ideas (tm) at the time...

Don't do it.

Overloading operators in "cute" ways like that invariably leads to more
problems than the dubious benefit of their usage.

--
Like Music?
http://l-i-e.com/artists.htm

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация