Hello,
i am trying with all my knowledge about php and tutorials on the internet to make that there are captions under all images. Because there is not much of both(although my knowledge about php is increasing slowly) i can't get the captions under the images.
I am this far;
Do you understand how functions work in PHP? You define a function by using the function keyword. Next you call it by using the function name and any possible parameters in between (). You can use the return keyword inside your function to return something, or an echo to echo something out immediately when calling the function.
I want to get the caption from the image alt names. Maybe its better to do that without the PHP funtions.
I have ryed to reach the image names with glob() function and get the alt names under the images with preg_replace, but it is not working and maybe i am on the wrong track.
How can i begin best to get the alt names under the images?
Well, i got captions under all the images but the caption is the imagename from the last image in the array. This imagename is under all the images were i click on, and it is with the .jpg extension. What am i doing wrong?