Image Alt and Title Tags

images php coding issues or problems here.

Moderators: macek, egami, gesf

bodders13
New php-forum User
New php-forum User
Posts: 1
Joined: Wed May 29, 2013 2:17 pm

Image Alt and Title Tags

Postby bodders13 » Wed May 29, 2013 2:19 pm

Hi I have my image and it has an alt and title tags. They are both the same so is there a way to easily echo or mirror the text for both rather than having to write the description for both.

For Ex:
<img src="images/restoration/cill.jpg" alt="description1" title="description1"/>

Thanks,

cappy2354
New php-forum User
New php-forum User
Posts: 5
Joined: Fri Jul 19, 2013 11:07 am

Re: Image Alt and Title Tags

Postby cappy2354 » Fri Oct 25, 2013 5:28 am

You could create a variable in php called $whatever = "Description 1"; and echo it in the alt and title tags.


Return to “PHP coding => Images”

Who is online

Users browsing this forum: No registered users and 1 guest

cron