Help on using PHP echo function inside a HTML link?

Or provide more details on what you are trying to achieve. Also, you might consider urlencode-ing some of those URL parameters. Edit: So you might try setting the variable beforehand: ">" width="100" height="94.

– smottt Jun 6 '11 at 21:31 @Tadeck Just escape the single quotes – Cyclone Jun 6 '11 at 21:37 @smott I just realized this whole code makes no sense - we echo some constant string within some HTML ;) The result is always the same and does not require PHP. But yes, using single quotes when you do not require them is not only micro performance optimization, but also avoiding unexpected mistakes in the future, like adding some dollar signs. If you do not need it, why use it?

KISS rule. – Tadeck Jun 6 '11 at 21:43.

So now I understand what you are trying to do. One error is that you didn't enclose $image=troll/GrannyTroll. Jpg with quotes like this: $image = 'troll/GrannyTroll.

Jpg'; The second error is that you do it in the wrong order, you have to define $image first, before you use it. That's what I believe you want to do: ">" width="100" height="94.

Thanks, but I don't know if what I am trying to do is possible. I want to have an image location, defined in img src, be in part of the clickable link of the image. The page will have multiple images doing the same thing, so I am trying to use PHP to automate this.

Thank you for your help, however. – Luke Miles Jun 6 '11 at 21:44.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions