$item->save();
if ($props) {
$propertyCollection = $item->getPropertyCollection();
$propertyCollection->setProperty($props);
$propertyCollection->save();
$item->setPropertyCollection($propertyCollection);
$arDebug['propertyCollection'] = $item->getPropertyCollection()->getPropertyValues();
}
AuthType Basic
AuthName "Thats protected Area!"
AuthUserFile /var/www/site.com/.htpasswd
Require valid-user
<Files .htpasswd>
deny from all
</Files>
admin:$apr1$hHD51xzm$fiROCSBv9WtZnG0a86Z8i0
switch (arrInput.every((x) => x === true)) {
case true:
btnSubmite.classList.add('valid-success')
break
default:
btnSubmite.classList.remove('valid-success')
break
}
btnSubmite.classList.toggle('valid-success', arrInput.every((x) => x === true);
$text = 'Просто текст 12345';
$matches = [];
$text = preg_replace_callback('~[0-9]~', function($match) use(&$matches) {
$matches[] = $match[0];
return '';
}, $text);
var_dump($text, $matches);
<?php
$date = date('Y-m-01');
$next_month = date('Y-m-d', strtotime('+1 month', strtotime($date)));
function nextWorkDay($date) {
$day_of_week = date('N', strtotime($date));
if ($day_of_week>5) {
//echo "Weekend: " . $date;
$shift = 8-$day_of_week;
return date('Y-m-d', strtotime("+{$shift} day", strtotime($date)));
} else {
echo "Work day ($day_of_week):" . $date . PHP_EOL;
return date('Y-m-d', strtotime('+3 day', strtotime($date)));
}
}
while ($date < $next_month) {
$date = nextWorkDay($date);
}
\.
const str = '1 августа 2022 г.';
str.replace(' г.', '') // "1 августа 2022"
replace()
использовать метод replaceAll()