You are here: Re: Variables « PHP Programming Language « IT news, forums, messages
Re: Variables

Posted by Alvaro G Vicario on 06/09/05 17:26

*** CyberDog wrote/escribió (Thu, 09 Jun 2005 14:58:34 +0200):
> There are more ways to defina an variable:
>
> 1. $var = 'value'; Notice the '
> 2. $var = "value"; Notice the "
>
> and what is the third? Something like /"value/" I think...

As far as I know there're only two ways to define a variable: the =
operator and functions that receive arguments by reference and modify
arguments:

$var='value';

and

function asign_value(&$foo){
$foo='value';
}
asign_value($var);

If you mean constants, you use the define() function:

define('FOO', 'value');
echo FOO;

And if you're talking about strings, you need to consider single quotes,
double quotes and dot (concatenation operator). Double quotes make PHP
perform variable parsing in strings.


--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--

 

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

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