I have the following php:
<?php
$image_directory = JPATH_SITE . '/images/site/';
$images = JFolder::files($image_directory);
foreach($images as $image) {
echo '<li><img src="/images/site/'.$image.'">
<p class="slidecaption">'.$image.'</p></li>';
}
?>
So $images ends up being 1980.jpg (for example). How can I perform an operation on this string and strip the ".jpg" and output for the slidecaption paragraph?
Many thanks for your time.