Reply to Re: print("something");

Your name:

Reply:


Posted by Michael on 11/21/07 23:51

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

[Back to original 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

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