Answer the question
In order to leave comments, you need to log in
What is missing in the PHP code to display the full html code?
Hi, please tell me, I'm trying to write an html output function in php, without knowing it at all.
// Получаем массив от плагина картинок
$our_guests_images = acf_photo_gallery('ourguests_gosti', 143);
function guest_single($number, $photo_id)
{
// Вывожу нужные элементы массива в отдельные переменные для удобства
$link_out = $our_guests_images["$photo_id"]["url"];
$img_out = $our_guests_images["$photo_id"]["full_image_url"];
$title_out = $our_guests_images["$photo_id"]["title"];
// Переменная с конечным кодом, который нужно вывести
$echo_content = '
<a href="'.$link_out.'" class="guest-photo guest-photo--'.$number.'" target="_blank" >
<img src="'.$img_out.'" alt="">
<div class="guest-photo__link">'.$title_out.'</div>
</a>';
return $echo_content;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question