Win a copy of Serverless Applications with Node.js this week in the NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

display image in center through php code  RSS feed

Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sir, i want display my image on center....this code showing left side...need help


$files = glob("gallery/*.*");

for ($i = 0; $i < count($files); $i++) {

   $image = $files[$i];

   echo basename($image) . "<br />"; // show only image name if you want to show full path then use this code // echo $image."<br />";

   echo '<img src="' . $image . '" alt="" />' . "<br /><br />";



Staff note (Knute Snortum):

This is a PHP question. I moved it to the appropriate forum.

Always look on the bright side of life. At least this ad is really tiny:
global solutions you can do in your home or backyard
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!