FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » displaying random images with an appropriate caption
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: displaying random images with an appropriate caption [message #175965 is a reply to message #175963] Fri, 11 November 2011 10:50 Go to previous messageGo to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma:
Senior Member
On Thu, 10 Nov 2011 22:27:43 -0800, paris2venice wrote:

> I also corrected a couple of syntax errors but mostly the code is
> exactly as in your code above.

Yeah, I used $mages where I should have used $images, and missed the $
from {$imgfile} in the heredoc.

> This is what is commented out:
>
> //echo <<<EOT
> //<p style="text-align:center;margin:0 auto"> //<img
> src="http://www.geol.ucsb.edu{$imgfile}" alt="{$captiontext}" /
>>
> //<br />
> //{$captiontext}</p>
> //EOT;
>
> As you can see, it appears fine with the here doc commented. I just
> can't see what is wrong with the here doc. Thanks for any further help.

All the heredoc does is wrap the image and caption in a centered
paragraph, html 4.01 type markup. It was an example of how to output the
caption and image. Did you try it (a) without the style attributes (b)
using a div instead?

I wasn't trying to generate markup and css that would fit neatly into
your existing page layout, I was generating a standalone paragraph.

http://www.sined.co.uk/tmp/randomPic.php
http://www.sined.co.uk/tmp/randomPic.txt (source)

Rgds

Denis McMahon
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php development environment in windows problems
Next Topic: Images retrives
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Nov 23 22:57:45 GMT 2024

Total time taken to generate the page: 0.04774 seconds