$price = number_format ($meta['trip_prev_price'], 0, '.', ' ');
Постом не получается - вылазит ошибка csrf токена
Как закодировать символ & в GET запросе?
<?php
$text = '
[Оля Старицына|id8888], [id555|Надежда Созыкина], [id665|Катя Иванова]
';
$re = '/\[((id|club)\d+)\|([^\]]+)\]/';
$replacement = '<a href="https://vk.com/$1" target="_blank">$3</a>';
$text = preg_replace($re, $replacement, $text);
echo $text;
[Оля Старицына|id8888], <a href="https://vk.com/id555" target="_blank">Надежда Созыкина</a>, <a href="https://vk.com/id665" target="_blank">Катя Иванова</a>
<?php
$products = [
[
'title' => 'Товар 1',
'theme' => 'Кастрюли',
],
[
'title' => 'Товар 2',
'theme' => 'Кастрюли',
],
[
'title' => 'Товар 3',
'theme' => 'Сковородки',
],
[
'title' => 'Товар 4',
'theme' => 'Сковородки',
],
[
'title' => 'Товар 5',
'theme' => 'Кружки',
],
[
'title' => 'Товар 6',
'theme' => 'Кружки',
],
];
$categories = [];
foreach ($products as $product) {
$categories[$product['theme']][] = $product['title'];
}
foreach ($categories as $category => $products) {
echo "<b>$category</b>";
echo "<ul>";
foreach ($products as $product) {
echo "<li>$product</li>";
}
echo "</ul>";
}
$spreadsheet->getActiveSheet()->getColumnDimension('B')->setAutoSize(true);
echo $PATH
)cd /usr/bin
touch ctl
#!/bin/bash
sudo systemctl $1 start
chmod +x ctl