answersLogoWhite

0


Best Answer

the dollar sign appears before a variable/array. Essentially it just tells php that its a variable.

$food = "cheese Pizza";

or

$myfavoritenumber = 2 ;

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the Use of a dollar sign in php?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Basic Math

What is the Use of a double dollar sign in php?

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


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.


What are variables in PHP?

PHP variables are variables are written in a way which is similar to JavaScript. To define a PHP variable, you will need to add a dollar sign ($) preceding the unique name you will give to your variable. Next, you will give the variable a value by typing an equals sign (=) then a value surrounded by quotes. NOTE: If you are going to have quotes in the value, the make sure you type that quote as ", not /". After your done, you will end the command by adding a semicolon (;). Your code should look like the example below: $name = "value"; There you go, you got yourself a simple variable.


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.


What is syntax in php?

We can use php tags in different ways. <?php //php code to be written here ?> OR <? //php code ?> This tag will not work when we using editors such as macromedia dreamweaver. OR < script language="php"> //php code </script>

Related questions

What is the Use of a double dollar sign in php?

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


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.


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 ?>.


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.


How do you use PHP in HTML?

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


How much is one dollar in Philippines?

As of September 2021, one US dollar is equivalent to around 50-52 Philippine pesos. The exchange rate can fluctuate daily based on market conditions.


What is the french dollar sign?

The French use the Euro, €


What is the abbreviation for the word money?

dude, use a dollar sign.


What is the default extension that most Web servers use to process php scripts?

PHP files extension is .php


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?


Does the negative sign come before or after the dollar sign?

Does the negative sign come before or after the dollar sign?The negative sign comes before the dollar sign.