Home News Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | PHP Code - Print Filename Under Image


You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion

PHP Code - Print Filename Under Image
Reply
 
Thread Tools
Old 13-10-2010, 09:06   #16
JediMaster
Use The Force
 
JediMaster's Avatar
 
Join Date: Jan 2004
Location: Swansea
Posts: 1,376
JediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these partsJediMaster is just so famous around these parts
Re: PHP Code - Print Filename Under Image

Quote:
Originally Posted by Graham M View Post
So did this do what you wanted?

Amazing Just got online (I dont go online at night due to my disability).

I did try add that code to a few places before asking for help (after Googling for help). But I was putting it in the wrong place... I was adding in the top part of code not where you told me

Thanks again
JediMaster is offline   Reply With Quote
Advertisement
Old 13-10-2010, 11:23   #17
Graham M
 
Graham M's Avatar
 
Join Date: Jul 2003
Location: Poole, Dorset
Age: 27
Services: Sky+ V-Box VM 10MBit
Posts: 12,927
Graham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny star
Graham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny starGraham M has a nice shiny star
Send a message via MSN to Graham M Send a message via Yahoo to Graham M
Re: PHP Code - Print Filename Under Image

I do think you need to get yourself a book (e- or otherwise) and start from the basics, PHP is a scripting language, and as such is USUALLY run from the top down to the bottom (there are a few exceptions)

PHP Code:
if ($handle opendir($images)) {
   while (
false !== ($file readdir($handle))) {
       if (
$file != "." && $file != ".." && $file != rtrim($big,"/")) {
           
$files[] = $file;
       }
   }
   
closedir($handle);

Is where the $files array is generated, one key at a time, so trying to operate on that array before it has been actually initialised obviously will not work, you can put the sort function any time after that.
__________________
Desktop: Intel i7 SandyBridge 2600k 3.4GHz @ 4.7GHz - 8GB DDR3 - ATI Radeon HD 5770 1GB - OCZ Agility 3 60GB SSD Laptop: Dell Studio 15 - Intel i3 M350 @ 2.27GHz - 3GB DDR3 - ATI Radeon Mobility 4570
Graham M is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Google Search




All times are GMT +1. The time now is 12:31.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Copyright © 2003 - 2012, Cable Forum.
(server1.cableforum.co.uk)

SEO by vBSEO 3.3.2