answersLogoWhite

0

In the declaration of the receiving function, you add an ampersand.

<?php

function myWayCoolFunction( &$params)

{.....}

$x = array('1','2','3');

myWayCoolFunction($x)

?>

User Avatar

Wiki User

14y 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 &lt;script&gt; var jQueryVariable=&lt;?php echo $anyVariable?&gt; &lt;/script&gt;


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. &lt;?php $_SESSION['variable'] = "value"; ?&gt;


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.


How do you retain a variable value in PHP after any change?

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;


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


How can you pass a JavaScript value into a PHP file?

JavaScript lives in the browser, PHP lives on the server.To pass a value from JavaScript to a PHP page, you can eitherdo an HTML form submituse AJAXIn both cases, the value is sent to the server and you write your PHP to handle it and send a response.The important thing is that the JavaScript value won't be available in PHP when you first generate the page, creating the page and handling the value submitted from the browser are two distinct steps.


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. &lt;?php $var[1] = "Hello"; $var[2] = "Lalala"; print $var[2]; // prints Lalala but not Hello ?&gt;


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? &lt;?php $name="ram"; //declaring and defining the variable echo "$name"; //printing the variable using echo command ?&gt;


Does a variable pass through the origin?

A variable passes through the origin if its value is 0 at that point.