Referencing a picture based on a url
Posted: Thu Mar 25, 2010 10:19 pm
I have some php code that is printing a sites 'logo' and 'name' at the top of an email and making it a link back to the site.
It looks like this:
Now, I'd like to use a scaled down version of the logo so it is not so big in the email.
Lets call the image: small-logo.png
and it resides in my http://www.mysite.com/image directory
I tried to replace the
With something like this:
I thought that as long as I "defined" the variable first that I could get it to be displayed by using 'print' or 'echo' in the code.
It is probably very obvious that I am new at this, but I'd appreciate any help you can give.
It looks like this:
Code: Select all
<td>
<h1 style="font-family:Arial,Helvetica,sans-serif; font-size:18px;"><a href="<?php print $site_url; ?>" title="<?php print $site_title; ?>"><?php print $logo; ?> <?php print $site_name; ?></a></h1>
</td>Lets call the image: small-logo.png
and it resides in my http://www.mysite.com/image directory
I tried to replace the
Code: Select all
<?php print $logo; ?>Code: Select all
<?php $small_logo="www.mysite.com/image/small-logo.png" print $small_logo; ?>It is probably very obvious that I am new at this, but I'd appreciate any help you can give.