?url=https%3A%2F%2Ftest.ru%2Fasdasd%3F%26s%3D0%3D1%3D3
&private=0&access_token=****&v=5.131
<?php
$post = 'xxx yyy окно окно zzz окно fff';
$result = str_replace(
'окно',
'<strong>окно</strong>',
$post
);
var_dump($result);
<?php
$number = cal_days_in_month(CAL_GREGORIAN, 7, 2022);
$start = 15;
$days_counter = 0;
$rabota = [];
for ($i = $start; $i <= $number; $i++) {
$days_counter++;
if($days_counter <= 2) { //1, 2
$rabota[$i] = 'Рабочий';
} elseif($days_counter <= 4) { //3, 4
$rabota[$i] = 'Выходной';
}
if($days_counter >= 4) { //сбрасываем счётчик после 4 дня
$days_counter = 0;
}
}
print_r($rabota);
return
из тела циклаIf called from within a function, the return statement immediately ends execution of the current function