Associate
- Joined
- 10 Jul 2006
- Posts
- 2,423
Hi there,
I was wondering if it was possible to send a variable to a function in PHP and use it.
Eg:
Hope that makes sense.
Thanks.
I was wondering if it was possible to send a variable to a function in PHP and use it.
Eg:
Code:
<?
$variableString = "string";
function stringConc($string, $variable){
$variable .= $string;
}
stringConc("hello string",$variableString);
//Below will echo "stringhello string" - well thats what i want it to do.
echo $variableString;
?>
Hope that makes sense.
Thanks.
Last edited: