![]() |
|
#1
|
||||
|
||||
|
php random image
I have a code for a php random image and I want the random images to appear in the center of my logo..or about the center anyway. Is it possible to place my random images in my logo where ever I want them? if so..how would I do this?
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
| Sponsored Links |
|
#2
|
||||
|
||||
|
I'd put the script into a div.
__________________
You know you're addicted to Photoshop when... 1. You see the world with one eye and stock images with the other. 2. You ponder the meaning of existence without layers. 3. You scream out fonts as they appear on TV. 4. You're standing by the ocean and wondering who used Ocean Ripple. |
|
#3
|
||||
|
||||
|
how would I do that? can you give me an example. Here is my php code that I use to make my random images to appear.
PHP Code:
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
|
#4
|
||||
|
||||
|
Assuming that $rl is the code to display the image.
Where ever that echo statement is within your html structure is exactly where the image will be placed. David
__________________
“Do all the good you can, By all the means you can, In all the ways you can, In all the places you can, At all the times you can, To all the people you can, As long as ever you can.” -John Wesley |
|
#5
|
||||
|
||||
|
I'm lost..what are you talking about?
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
|
#6
|
||||
|
||||
|
ohhh ok..well thats why I'm asking how would I align this? can someone give me an example please?
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
|
#7
|
|||
|
|||
|
As Arwen suggested, you could put your image inside a divider and then align it with CSS.
HTML Code:
<html> <head> <title>Example Page</title> </head> <body> <? $random = "random.php"; $fp = file($random); srand((double)microtime()*1000000); $rl = $fp[array_rand($fp)]; ?> <!-- Just an example, but you would probably get a better result trying to align your divider with CSS --> <div align="center"><? echo $rl ?></div> </body> </html> |
|
#8
|
||||
|
||||
|
alright..thanks..I actually made a new php page and just added the code and then I put an iframe and aligned that iframe with css. But I'll try it this way and see how it turns out.
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
|
#9
|
||||
|
||||
|
I highly advise against any type of frames.
Also, wouldn't it be easier to do this: Code:
<img src="image<?php echo(rand(1,20)); ?>.gif"> Code:
<div style="margin: 0px auto;"> <img src="image<?php echo(rand(1,20)); ?>.gif"> </div>
__________________
|
|
#10
|
||||
|
||||
|
thanks..can you maybe try and code it out for me? here is an example of what my layout looks like.
http://johnfisher.myknet.org/bleach/index.php
__________________
:lolo: BWAHAHAHAHAHAHAHAHAHAHAHA:lolo: |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| please help help 4 friendster | joue | CSS | 1 | 10-01-2005 03:03 PM |
| Random order of content in PHP? | I, Brian | Advanced Programming | 5 | 09-20-2005 07:52 PM |
| random image | itsme | JavaScript/DHTML | 4 | 03-26-2005 12:13 PM |
| Php Scripting... BASIC - INTERMEDIATE... (includes full mysql tutorial) | Mushroom5698 | User Submitted Tutorials | 3 | 05-19-2004 12:22 PM |