|
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]
|