Function -> Sending URL's
| From: | Abe | Date: | Thu, 11 Jan 2001 21:34:55 +0000 |
| Subject: | Function -> Sending URL's | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-34101@lists.php.net to get a copy of this message | ||
Hey there,
this is a strange one - I want to send a URL to a function that includes
varibles. Those variables should be taken from within the function - as in
the example below the link I want is:
asdfasdf.php3?name=TEST , but that is not what I get as you can see.
Does anybody know a way around this - The example is simpler than what I am
actually doing and the value of $company must come from the variable.
Thanks,
Abe
<?
function testPassVar($url) {
$name = "TEST";
echo "<a href=\"$url\">Click</a>";
}
$url = 'asdfasdf.php3?name=$company';
testPassVar($url);
echo "This is a $name";
?>