$string = '[{"count":1,"img":"/img/789.jpg","title":"Перчатки трикотажные","price":8,"id":"197299_65366_2"}]';
$array = json_decode($string, true);
/*
Array
(
[0] => Array
(
[count] => 1
[img] => /img/789.jpg
[title] => Перчатки трикотажные
[price] => 8
[id] => 197299_65366_2
)
)
*/
$v9a5cb5d8 = "$user_name@$v0897acf4";
if ($name_name != '') $vd98a07f8 = "$name_name <$v9a5cb5d8>";
else $vd98a07f8 = $v9a5cb5d8;
$vb8ddc93f = "From: $vd98a07f8";
$vb8ddc93f.= "Reply-To: $vd98a07f8";
$v3c87b187 = "X-Priority: 3 (Normal)";
$v3c87b187.= "MIME-Version: 1.0";
$v3c87b187.= "Content-Type: text/html; charset=\"iso-8859-1\"";
$v3c87b187.= "Content-Transfer-Encoding: 8bit";
$v4340fd73 = "Date: " . @date("D, j M Y G:i:s O") . "" . $vb8ddc93f;
$v4340fd73.= "Message-ID: <" . preg_replace('/(.{7})(.{5})(.{2}).*/', '$1-$2-$3', md5(time())) . "@$v0897acf4>";
$v4340fd73.= "To: $v01b6e203";
$v4340fd73.= "Subject: $subject";
$v4340fd73.= $v3c87b187;
$v841a2d68 = $v4340fd73 . "" . $s_body;
function theLogo($obj) {
switch ($obj->language) {
case "ro-ro":
$image = '<img src="templates/' . $obj->template . '/images/akzente-logo-ro.jpg" alt="Akzente Ro" />';
break;
case "de-de":
$image = '<img src="templates/' . $obj->template . '/images/akzente-logo-de.jpg" alt="Akzente De" />';
break;
default:
$image = '<img src="templates/' . $obj->template . '/images/akzente-logo-ro.jpg" alt="Akzente" />';
break;
}
echo '<a href="'.$obj->baseurl.'">'.$image.'</a>';
}
<?php theLogo($this); ?>
function compac(array $data)
{
return array_filter($data, function($el) {
return !empty($el);
});
}
print_r(compac([0,1,2,3,null,5]));
function compac(&$data)
{
$data = array_filter($data, function($el) use ($data) {
return !empty($el);
});
}
$array = [0,1,2,3,null,5];
compac($array);
print_r( $array );