<svg
width="3840"
height="1202"
viewBox="0 0 3840 1202"
fill="none"
xmlns="http://www.w3.org/2000/svg"
version="1.1"
baseProfile="full"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:ev="http://www.w3.org/2001/xml-events"
>
<defs>
<filter id="filter0_d_380:12132" x="-54" y="0" width="3907" height="1202" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dy="-9"/>
<feGaussianBlur stdDeviation="6.5"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"/>
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_380:12132"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_380:12132" result="shape"/>
<filter>
<linearGradient id="paint0_linear_380:12132" x1="1900.47" y1="245.905" x2="1899.95" y2="1002.27" gradientUnits="userSpaceOnUse">
<stop stop-color="#3B76B0"/>
<stop offset="1" stop-color="#4D94C2"/>
</linearGradient>
</defs>
</svg>
int min;
min = 0;
for (int i = 0; i < 5; i += 1) {
for (int j = 0; j < 5; j += 1) {
if (arr[i][j] != 0 && (min == 0 || arr[i][j] < min)) {
min = arr[i][j];
}
}
}
foreach ($data->mainarr->arr2 as $item) {
doSomething($item);
}
должна работать независимо от того, один элемент arr2 или несколько.