I'm designing a photo gallery for my website, I've followed several tutorials online about how to go about doing this, with great success, I have come up with a set of codes, however I keep getting several error messages when I run my code. Furthermore I'm a beginner at PHP programming so please bare with me.
the error message I get is as follows:
Notice: Undefined offset: 2 in C:\wamp\www\LuxuRay\album.php on line 213
Notice: Undefined offset: 2 in C:\wamp\www\LuxuRay\album.php on line 223
I've gone through my code a million time but cannont find whats wrong with it. So if somebody can take a look at my code and tell me whats wrong I would my much obliged.
My code is as follows:
Expand|Select|Wrap|Line Numbers
- for( $i=$start; $i<$start + $itemsPerPage; $i++ ) {
- if(is_file( $src_folder .'/'. $files[$i] ) ) {
- echo '<div class="thumb">
- <a href="'. $src_folder .'/'. $files[$i] .'" class="albumpix" rel="albumpix">
- <img src="'. $src_folder .'/thumbs/t_'. $files[$i] .'" width="'.$thumb_width.'" height="'.$thumb_height.'" alt="" />
- </a>
- </div>';
- } else {
- echo $files[$i];
- }
- }
By the way Line 2 = Line 213 and Line 14 = Line 223
Thanks