I have this piece of code:
<img src="<?php echo img('Background9.jpg'); ?>" />
I would like the image (Background9.jpg) to be linked to this page: www.example.html
I have looked through a lot of posts and solutions here, but try as I might I cannot figure out exactly how to accomplish that.
Charlie

Member Avatar for diafol
<a href="http://www.example.html"><img src="<?php echo img('Background9.jpg'); ?>" /></a>

Nope that does not work.
This image is in a header.php and trying that piece of code does not display the header.

My mistake. I finally recalled that for some reason whenever I uploaded files to our server, I then had to change the file properties so that the server will actually execute the file. So the code does work now.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.