Answer the question
In order to leave comments, you need to log in
Why does the name get lost after preg_match?
there is a line
string(112) "Платье
Размер единый 42-48
Материал лапша
Цена 350 руб"
/^.[а-яА-Я]+/ - чтобы найти слово Платье и записать в массив
Answer the question
In order to leave comments, you need to log in
I tried like this. Removed all emoji. still got that damn question mark.
$css = array();
$main = "Платье
Размер единый 42-48
Материал лапша
Цена 350 руб";
echo '<pre>';
var_dump($main);
echo '</pre>';
$fullname = preg_replace ("/[^a-zA-ZА-Яа-я0-9\s]/iu","",$main );
echo '<pre>';
var_dump($fullname);
echo '</pre>';
preg_match_all('/^.[а-яА-я]+/', $fullname, $css);
$preg_name = $css;
echo '<pre>';
var_dump($css);
echo '</pre>';
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question