Link to home
Start Free TrialLog in
Avatar of Computer Guy
Computer Guy

asked on

How can I display the photo number

Hi,

I have a little photo gallery.

All photos are numbered starting with 01 (leading 0 included for photos 1-9)

I want to display that number in the "DISPLAY PHOTO NUMBER HERE (02 FORMAT)" area of the code attached.

Just the number "02", with out the file extension.

How can I do that?

Thanks!

<?
	for ($i = $start; $i < $limit; $i++) {
		if (!isset($photos[$i])) break; // No more photos
		echo '<a class="vlightbox1" href="' . $eventinfo['photo_path_url'] . '/web/' . $photos[$i] . '"><img src="' . $eventinfo['photo_path_url'] . '/thumbs/' . $photos[$i] . '" alt="Photo" border="0"/>'. $product_title .'DISPLAY PHOTO NUMBER HERE</a>';
	}
	?>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of k_romych
k_romych

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Computer Guy
Computer Guy

ASKER

With the code I gave as a demo, it does not add the photo number.

I would like to add the photo number.

The photos are like this: 01.jpg, 02.jpg, 03.jpg, 04.jpg, 05.jpg, 06.jpg, 07.jpg, 08.jpg, 09.jpg, 10.jpg, 11.jpg, etc....

I just want to display the number without extension in front of the </a> tag

PHOTO_NUMBER</a>