You are here: Re: Glue together variable and string « PHP Programming Language « IT news, forums, messages
Re: Glue together variable and string

Posted by Ivαn Sαnchez Ortega on 03/01/06 11:17

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Krustov wrote:

>>>$thc="$suffix" . "$height";
>>
>> The double-quotes are pointless here, but otherwise correct.
>
> How pointless is that ? .

Just pointless.

Using double-quotes in that scenario will just increase the parsing time. If
you want to concatenate two (mixed) variables into one string, just use the
"." operator. That will make an implicit variable casting of any numeric
(integer or float) variables to string, with no need to use any quotes or
explicit casting:

$thc = $height . $suffix;

And, BTW: KISS.

- --
- ----------------------------------
IvΓ‘n SΓ‘nchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

El que las hace, las imagina.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFEBWag3jcQ2mg3Pc8RApfFAJ9xauBkL6tMS4D/z0oToUG8WFEJLQCfSnpC
z2mmzPVLqRGUt1S8JDCkzIg=
=DeIU
-----END PGP SIGNATURE-----

 

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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация