Please how could i get the first image url from an array.
foreach ( $disli as $value ) {
$image = RWMB_Image_Field::file_info( $value, ['size' => 'large'] );
echo '<a href="' . $image['url'] . '" data-lightbox="'.$dislider['gallname'].'"></a>';
}
echo '<a href="'.$image['url'][0]. // first item ?? '"
data-lightbox="'.$dislider['gallname'].'">
<span class="material-icons imag" style="display: block;color:'.$dislider['textcolorr'].'">image</span>
</a>';
I need to open lightbox with icon but icon needs an url to open it.