pmmms
asked on
php: meaning of "?@"
What is the meaning of ?@ in a construct like this
$var = array
(
'{?@Customer}' => $Customer,
'{?@Month}' => $Month,
'{?@Year}' => $Year,
);
Thank you in advance for any help.
@+ P Marione
$var = array
(
'{?@Customer}' => $Customer,
'{?@Month}' => $Month,
'{?@Year}' => $Year,
);
Thank you in advance for any help.
@+ P Marione
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It means nothing, the single quotes don't invoke the interprerter, it would be different if it had double quotes.
ASKER
What would it means with double quotes?
hi!
php differs between two types of strings: the ones enclosed in double quotes, and the one enclosed in single quotes. the difference is the following: the double quotes are ecutally parsed by the php interpreter, and variables inside are properly filled with its values, while single quotet are not parsed at all, so are used for real string literals. a short example:
$var = 15;
echo '$var=$var';
echo "\$var=$var";
would give as an output:
$var=$var
$var=15
here the first string is enclosed by a single quote, so it is a real literate, while the second is first parsed by the php engine, and variables are replaced by their values. you can also write the first string this way:
$var = 15;
echo '$var=' . $var;
echo "\$var=$var";
now both stings would be the same....
that's why the above sample doesn't mean anything by the means of the php language itself, it is a real constant literal, not interpreted by the language itself, I guess it is just some convention to name parameter keys in some famework.....? where did you see this code?
php differs between two types of strings: the ones enclosed in double quotes, and the one enclosed in single quotes. the difference is the following: the double quotes are ecutally parsed by the php interpreter, and variables inside are properly filled with its values, while single quotet are not parsed at all, so are used for real string literals. a short example:
$var = 15;
echo '$var=$var';
echo "\$var=$var";
would give as an output:
$var=$var
$var=15
here the first string is enclosed by a single quote, so it is a real literate, while the second is first parsed by the php engine, and variables are replaced by their values. you can also write the first string this way:
$var = 15;
echo '$var=' . $var;
echo "\$var=$var";
now both stings would be the same....
that's why the above sample doesn't mean anything by the means of the php language itself, it is a real constant literal, not interpreted by the language itself, I guess it is just some convention to name parameter keys in some famework.....? where did you see this code?
ASKER
@+P Marione