Words into Image Alt tags
Posted: Mon Nov 20, 2006 10:13 am
Hi All,
Just wondering whether this can be done.
I have a text field from a database. I need this to be displayed in a table, but the text is varying lengths and makes my tables look unsightly. The text is not essential and an option I am considering is having a small image appear in the last column of my table if the field has a value.
When the image is hovered I want the text to be displayed in the alt tag.
I have used the following code to try to achieve this
This code only produces the first word when the image is hovered.
Many Thanks
Jamie
Just wondering whether this can be done.
I have a text field from a database. I need this to be displayed in a table, but the text is varying lengths and makes my tables look unsightly. The text is not essential and an option I am considering is having a small image appear in the last column of my table if the field has a value.
When the image is hovered I want the text to be displayed in the alt tag.
I have used the following code to try to achieve this
Code: Select all
<?php
if ($Issues){ ?>
<img src="images/title.jpg" width="10" height="10" alt = <?php echo $Issues;?>>
<?php
}
?>Many Thanks
Jamie