Re: concatenate?

From: Date: Wed, 29 Aug 2001 13:05:19 +0000
Subject: Re: concatenate?
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-65012@lists.php.net to get a copy of this message
<?php $user="alalaba"; echo "${user}s here"; ?> Produces : alalabas here <?php $user=array("alalaba"); echo "${user}s here"; ?> Produces : Arrays here Andrey Hristov IcyGEN Corporation http://www.icygen.com 99% ----- Original Message ----- From: "Soeren Nielsen" <news@n-crypt.dk> To: <php-general@lists.php.net> Sent: Wednesday, August 29, 2001 3:46 PM Subject: Re: [PHP] concatenate? > > does anyone know of a scenario (perhaps involving > > non-string data) where the concatenation does not > > return the same answer? > > If you have three vars: > $user = "foo"; > $users = array("Peter","Michael"); > > This could be a problem: > echo "$users hair is brown"; > > if what you ment was: > echo $string."s hair is brown"; // Peters hair is brown > > > Regards, > Søren > > PS: In Danish (I'm Danish) you write 'Peters hair' and not 'Peter's > hair' which why I made this silly example :-) > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#65012) next »