P. S. Я изобретатель оружия, военный теоретик... и программист-джуниор.
$balance = json_decode($json, true);
echo $balance['result']['balance'];
<?php
foreach($items as $value) {
$data = json_decode($value['tarif'], true);
foreach ($data as $item) {
?>
<div style="order:<?= $i =>" class="rowdesctop Rtable-cell <?= $class ?>">
<?= $item['title'] ?>
</div>
<?php
}
}
?>
<?php
//А тут капелька ФП :)
function list_item($i, $class, $item) {
return "<div style=\"order:$i\" class=\"rowdesctop Rtable-cell $class\">$item[title]</div>"
}
?>
<?= implode(array_map(
function ($value) use ($i, $class) {
return implode(array_map(
function ($item) use ($i, $class) {
return list_item($i, $class, $item);
}
json_decode($value['tarif'], true)
));
},
$items
))?>
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/css text/javascript application/javascript application/x-javascript
</ifModule>
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include mime ^text\.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^application/javascript.*
mod_gzip_item_exclude mime ^image\.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpg|jpeg|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access 7 days"
ExpiresByType image/x-icon "access plus 6 month"
ExpiresByType image/jpeg "access plus 6 month"
ExpiresByType image/jpg "access plus 6 month"
ExpiresByType image/png "access plus 6 month"
ExpiresByType image/gif "access plus 6 month"
ExpiresByType application/x-shockwave-flash "access plus 6 month"
ExpiresByType text/css "access plus 7504800 seconds"
ExpiresByType text/javascript "access plus 7516000 seconds"
ExpiresByType application/javascript "access plus 7516000 seconds"
ExpiresByType application/x-javascript "access plus 7516000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
вывести каталог либо плиткой, либо списком
$.fn.isInViewport = function() {
var elementTop = $(this).offset().top;
var elementBottom = elementTop + $(this).outerHeight();
var viewportTop = $(window).scrollTop();
var viewportBottom = viewportTop + $(window).height();
return elementBottom > viewportTop && elementTop < viewportBottom;
};
<br>
, PHP_EOL или что-то ещё) после вывода значения. <?php
echo '<img style="width: 242px; height: 224px;" src="https://habrastorage.org/webt/5d/af/4f/5daf4facbe8c6020796636.png" alt="такое">';