foreach ($cart
должно идти после того как вы определили переменную $cart
и в $arr
соотв-но нужно подставить содержимое $message
в которое в цикле вы помещаете названия товаров.<?php
//...
// Информация: имя майл
$cart = $_POST['cart'];
// Название товаров
$message = "";
foreach ($cart as $id=>$count) {
$message .= $json[$id]['name'];
};
//....
$arr = array (
'Имя пользователя: ' => $name,
'Телефон: ' => $phone,
'Email' => $email,
'Заказ' => $message,
);
path
который был при ух установке.path = /user/auth
то вы не сможете удалить их указав path = /
path
Есть сайт. В одном файле создаются cookies:
path = /
mysqli_error ( mysqli $link ) : string
echo mysqli_error($connection);
seed
[
'firstLevel1.secondLevel1.thirdLevel1' => 'thirdLevel1 value',
'firstLevel1.secondLevel2' => 'secondLevel2 value'
]
$str = 'https://domen.ru/wp-content/uploads/1.jpg xxxxxx
dsdgf sdfkgjsdkfl;jsdfg
https://drugoidomen.ru/wp-content/uploads/222.jpg yyyy
text text
https://domen.ru/wp-content/uploads/333.jpg zzzzz';
$re = '~(https:\/\/domen\.ru\/wp-content\/uploads\/(.*?)\.jpg)~mi';
$subst = 'https://domen.ru/wp-content/uploads/$2.png';
$result = preg_replace($re, $subst, $str);
var_dump($result);
<?php
$dict = [
'A' => '111',
'n' => '110',
'y' => '101',
' ' => '100',
't' => '01',
'e' => '001',
'x' => '000',
];
$str = 'Any text';
$result = strtr($str, $dict);
var_dump($result);
//string(22) "1111101011000100100001"
<?php
$route = Route::current();
$name = Route::currentRouteName();
$action = Route::currentRouteAction();