There was a problem. From the database comes the name of the image in the array, but when I call in Smatry, I only get the first letter of the file name, help solve the problem.
Code below
{foreach from=$rooms key=id item=val} <div class="rooms_content"> <h3 id="h3-options">Что включено:</h3> {foreach from=$val["optImagesA"] key=k item=v} <img src="./static/images/iconoptions/{$v.optImages}"/> {/foreach} <p>{$val.rooms} <a> Забронировать </a></p> </div> {/foreach} Debug smarty
$rooms Origin: "Smarty object" Value Array (2) 0 => Array (9) 0 => "4" id => "4" 1 => "80" hotelsid => "80" 2 => "Комната 1" rooms => "Комната 1" 3 => "icon1.png" optImages => "icon1.png" optImagesA => Array (1) 0 => "icon1.png" 1 => Array (9) 0 => "6" id => "6" 1 => "80" hotelsid => "80" 2 => "Room 2" rooms => "Room 2" 3 => "icon2.png,icon6.png" optImages => "icon2.png,icon6.png" optImagesA => Array (2) 0 => "icon2.png" 1 => "icon6.png" How does the value come
<img src="./static/images/iconoptions/i"/> Thank you in advance for your help.