You are here: Re: print("something"); « PHP Language « IT news, forums, messages
Re: print("something");

Posted by Michael on 11/26/07 00:35

I would just like to correct myself, print is also a language construct
that *behaves* like a function.

- Michael

Michael wrote:
> Zach wrote:
>>
>> Why does Larry Ullman in his book "PHP for the world wide web"
>> have Print ("something");
>> in his book if it is Bulltwit?
> Because it's legal syntax.
>>
>> Zach.
>>
>> Onideus Mad Hatter wrote:
>>> On Wed, 21 Nov 2007 00:22:27 +0100, Zach <xx@xx.xx> wrote:
>>>
>>>> I am totally new to php
>>>> Question:
>>>> I am working on a Vista box.
>>>> *.php files are displayed OK by the browser,
>>>> however,
>>>>
>>>> print("something");
>>>>
>>>> does not lead to "something" being displayed.
>>>> What is the cause / what should I do?
>>>>
>>>> Zach.
>>>
>>> Try echo "something";
>
> print is a function, echo is a language construct. This means you can
> use print in complex expressions such as:
>
> $s ? print "true" : print "false";
>
> Echo can take multiple arguments such as:
>
> echo 'hello', ' ', 'world!';
>
> where as print can only take one,
>
> print('hello world!');
>
> - Michael

 

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

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