<?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" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to