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

Posted by Andy Hassall on 02/28/06 22:43

On Tue, 28 Feb 2006 20:38:00 -0000, Krustov <krusty@krustov.co.uk.INVALID>
wrote:

><comp.lang.php , , helgefredheim@gmail.com>
><1141158879.329609.168420@u72g2000cwu.googlegroups.com>
><28 Feb 2006 12:34:39 -0800>
>
>> $suffix = "px";
>>
>> $height = 14;
>>
>> I need to print "14px" widthout any whitespace inbetween 14 and px. How
>
>$thc="$suffix" . "$height";

The double-quotes are pointless here, but otherwise correct.

If you wanted to use double quotes, an alternative is:

$thc = "$suffix$height";

The OP should read: http://uk.php.net/manual/en/language.types.string.php

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

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

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