{foreach from=$delivery->city item=cities_cart}
<option>{$cities_cart|escape}</option>
{/foreach}
$result = array();
$line = $new_info->city_countruies; //Moscow Saint-petersburg Krasnodar (с новой строки)
$ar = explode(", ",$line);
foreach($ar as $arr){
$lin = explode(", ",$arr);
$result[] = $arr;
}
$delivery->city = $result;
foreach($ar as $arr){
$lin = explode("\n",$arr);
$result[] = $arr;
}
$delivery->city = $result[1]; Вторую строку вывод
<select class="form-control" name="country">
<option value="">Moscow</option>
<option value="">Saint-petersburg</option>
<option value="">Krasnodar</option>
</select>
$(".fcats li.all_brands_filter").click(function() {
const str = window.location.href;
const newstr = str.replace(/&fb%5B\d{0,100}%5D=on/gi, '');
if(str) {
window.location = newstr;
}
});
if (isset($_POST['plus_love'])) {
$plus_love = $_POST['plus_love'];
$id = $_POST['id'];
if ($plus_love) {
$query = $okay->db->placehold("UPDATE ok_products SET loves = '$plus_love' WHERE id = '$id'");
$okay->db->query($query);
echo "$plus_love";
} else {
$query = $okay->db->placehold("UPDATE ok_products SET loves = '$plus_love' WHERE id = '$id'");
$okay->db->query($query);
echo "$plus_love";
}
}