answersLogoWhite

0

A double dollar sign in php makes a variable with a name equal to the value of the original variable. It works like this:

$var = "keith";

$$var = "palmer";

print ($keith);
// The output is: palmer

User Avatar

Wiki User

10y ago

What else can I help you with?

Continue Learning about Basic Math

What is the Use of a dollar sign in php?

the dollar sign appears before a variable/array. Essentially it just tells php that its a variable. $food = "cheese pizza"; or $myfavoritenumber = 2 ;


All variables in PHP start with which symbol?

In PHP, all variables must the preceded by the dollar sign. Variable name must not contain any space as well.


In PHP you can use both single quotes ( ' ' ) and double quotes ( ) for strings?

You can use single quotes $variable = 'string'; You can use double quotes $variable = "string"; You can use the Heredoc method $variable = <<<EOT Very Long String EOT; And you can use the Nowdoc method (after PHP 5.3.0) $variable = <<<'EOT' Very Long String EOT;


What is the difference between single quotes and double quotes in PHP?

There's not too much of a difference. Most people prefer using double quotes because of the fact that you can do this: <?php $var2 = "Look at {$var1}!"; ?> which you can't do the {} thing with single quotes. You would have to do <?php $var = 'Look at '.$var1.'!'; ?>


Why we use javascript as we have a powerful scripting language php?

First of all, PHP is server side, Javascript is client side. You cannot detect mouse gestures or any clicks with PHP the same way you cannot read a file or modify it or process a form (unless you use AJAX of course). Also, although I love PHP, and it has useful extensions such as the GD library, PHP is not a very good language. Overall we use javascript and PHP because they are used for two completely different things.

Related Questions

What is the Use of a dollar sign in php?

the dollar sign appears before a variable/array. Essentially it just tells php that its a variable. $food = "cheese pizza"; or $myfavoritenumber = 2 ;


What is the difference between variable and doubledollar sign in php?

I believe that in PHP syntax, double dollar sign is used when it is needed to pass on a variable, that has not yet been defined. Generally, this feature is not safe to use a can result in errors. Every algorithm which needs this kind of element, can also be handled by other means.


All variables in PHP start with which symbol?

In PHP, all variables must the preceded by the dollar sign. Variable name must not contain any space as well.


Which sign is used to concatenate two strings?

That depends on the programming language. Most languages use the "+" sign, but a few use other signs. For example, PHP uses the dot.


What is the use of a question mark in php?

It is used to tell the sever to use the PHP parser. To begin php you must use <?php, and to end it, it is ?>.


How do you use PHP in HTML?

You can't use PHP in an HTML document, but you can use HTML in PHP script.


What is the use of the double equal sign?

In programming languages, the equals sign may either denote a boolean operator to test equality of values (sometimes a double equal sign "=="), or it may denote an assignment (sometimes denoted with a colon-equals ":="). In some programming languages such as PHP a double equals sign ("==") denotes equivalence, meaning that the variables may not be of the same data type, but their values can be reduced to the same value. The triple equal sign ("===") denotes identity, meaning that not only do the two values parse to be the same, they are of the same data type. For instance, in PHP the expression ("0 false") is not, because the number 0 is an integer value, whereas false is a Boolean.


In PHP you can use both single quotes ( ' ' ) and double quotes ( ) for strings?

You can use single quotes $variable = 'string'; You can use double quotes $variable = "string"; You can use the Heredoc method $variable = <<<EOT Very Long String EOT; And you can use the Nowdoc method (after PHP 5.3.0) $variable = <<<'EOT' Very Long String EOT;


What is the difference between single quotes and double quotes in PHP?

There's not too much of a difference. Most people prefer using double quotes because of the fact that you can do this: <?php $var2 = "Look at {$var1}!"; ?> which you can't do the {} thing with single quotes. You would have to do <?php $var = 'Look at '.$var1.'!'; ?>


How do you rectify HTML to PHP variable error?

To use HTML as variable in PHP . echo the html tag written in double quotes. Example : <?php echo "<table>"; echo "<tr><td></td><td></td></tr>" echo "</table>"; ?>


Why should you use PHP and not JSP?

Firstly, this is wrong question. The right one would be WHEN should you use PHP, not JSP? or, WHEN should you use PHP and WHEN JSP?


What is the current value of USD to PHP?

1 U.S. dollar = 43.8000964 Philippine pesoshttp://www.google.nl/search?q=1+USD+to+PHP