answersLogoWhite

0

Simply reassign the value. If you have a variable $x, and you add 1 to it, you can store the value by stating $x = $x+1;

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How do you do the pass the variable value to the query in same php page?

To pass PHP Variable value in Jquery simpley echo that variable : Eg <script> var jQueryVariable=<?php echo $anyVariable?> </script>


How can you declare the variable in PHP?

Variables in PHP do not need to be declared like some languages (e.g. JavaScript). This is all that needs to be done to assign a variable: $variable = "Value";


What is a logical variable in PHP?

Maybe your speaking a variable that contains a ternary operators such as:


Write down a PHP code to add a session variable?

The preferred way is to simply alter the session superglobal. <?php $_SESSION['variable'] = "value"; ?>


How do you equate a php variable to a javascript variable?

Ideal thing would be to retrieve the value from PHP using AJAX and then assigning it to a java script variable. Thereafter compare it to the java script variable that is already present.


When should globals be used in PHP?

Problem with using global variables in php is that they lose the the assigned value in a different php file. They only keep the global variable value in the php file in which they are declared. Instead of globals try and use $_SESSION or $_COOKIE to keep value intact across different php files in a project


Can you connect to two MySQL databases on one PHP page?

Yes as long as you change the variable of them


How do you print a particular value using PHP?

To print a particular value in PHP you have to select which variable you wish to print. Below is an example of how this can be done. <?php $var[1] = "Hello"; $var[2] = "Lalala"; print $var[2]; // prints Lalala but not Hello ?>


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


How to display a variable in PHP using echo or print statements?

displaying a variable in php using echo statement? <?php $name="ram"; //declaring and defining the variable echo "$name"; //printing the variable using echo command ?>


How do you pass a variable by value in php?

In the declaration of the receiving function, you add an ampersand. <?php function myWayCoolFunction( &$params) {.....} $x = array('1','2','3'); myWayCoolFunction($x) ?>


How do you represent a variable in PHP?

Variables in php begin with $ and are declared by the user. $str1 = "wiki"; would store "wiki" into the variable $str1