Help with php
-
Hello,
I don’t really know php, I just work with what I can from others, copying and pasting and slowly understanding things. I have got this far with a link:
<a href="<?php echo $image->imageURL ?>" title="<h7><?php echo $image->alttext ?></h7><h8> | <?php echo $image->description ?></h8>" <?php echo $image->thumbcode ?> > <?php if ( !$image->hidden ) { ?> <img title="<?php echo $image->alttext ?>" alt="<?php echo $image->alttext ?>" src="<?php echo $image->thumbnailURL ?>" <?php echo $image->size ?> /> <?php } ?> </a>
(The reason I have h7 etc. inside a title is that the title is used by a script – shutter. It’s for making a photo gallery.)
It’s doing everything nicely, unless $image->description is empty. Then I get alttext followed by |. If the description is empty, I don’t want the | to display.
I guess this is pretty easy to do, if you know php? Something to do with ‘if’?
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Help with php’ is closed to new replies.