PHP Question
- Started
- Last post
- 4 Responses
- wordssssss
I have zero knowledge of PHP and was wondering how I could swap out the text 'next' with an image
if (($thePid + 1) < $numPages){ echo "<a href='requestPage.php?pid=".($thePid + 1)."'>next</a>";
}thanks in advance
- mkuplens0
See how on line 2 (as formatted here on QBN), the word "next" appears between > and </a>? That'd be the text that's being turned into a link.
If you need it to be an image, substitute the appropriate image tag (<img src="..." alt="..." title="..." />) for the text.
Alternatively (and much better) replace the text in the link with CSS (you'll need to add a class to the link tag (that's the <a... bit) to do this.
- wordssssss0
I thought so, but i keep getting:
unexpected T_STRING, expecting ',' or ';'
- drgss0
try single quotes in <img src='url' etc...>
- rounce0
Escape your strings!