I'm trying to populate php While loop function with data from a MySQL DB and having trouble coming up with a solution to place graphic images at specific screen coordinates.
I need a php means to write out CSS position:relative, left: $row[1], and top: $row[2].
I need php means to populate the <img> tag to show the graphic images. The name of the graphic image file is in $row[3].
Something like this perhaps:
while(){ echo '<div style="left:'.$row[1].' top:'.$row[2].'"><img src="'.$row[3].'"></div>'; }
Thanks Dagon...
I now have my graphic images displaying; however, they are not displayed per their Left and Top coordinates. I think I need to add "px" to the end of my database supplied coordinates.
yup add the px, and probably position absolute to, it has been a while since i have done much css.
This is working...
echo '<div style="position:absolute; left:'.$row[1].' px; top:'.$row[2].'px;"><img src="'.$row[3].'" alt="'.$row[0].'"></div>';