finkfink
finkfink

Reputation: 175

How to add a php parameter to a url?

I got to add a parameter such as $this->rock['link']; in a url.

<a href="<? "http://iguang.tw/?from=service&mail=$this->mail['link']?>">

It didn't work.

Upvotes: 0

Views: 86

Answers (3)

Benjio
Benjio

Reputation: 73

Try this you need to echo the php var

<a href="http://iguang.tw/?from=service&mail=<? Php echo $this->mail['link']?>">link </a>

Upvotes: 0

Michael Helwig
Michael Helwig

Reputation: 530

You question misses too many details, but the task is trivial anyway. Try:

<a href="<?php echo "http://iguang.tw/?from=service&mail={$this->mail['link']}"?>">

Upvotes: 2

Mahmood Rehman
Mahmood Rehman

Reputation: 4331

<a href="http://iguang.tw/?from=service&mail=<?php echo $this->mail['link'];?>">

Upvotes: 1

Related Questions