DobriMcConnor
Registered
Здравейте,
В дб имам
Как мога да изкарам само Text2?
В дб имам
Код:
Text1 * Text 2 (Text3)
Как мога да изкарам само Text2?
Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
Text1 * Text 2 (Text3)
$string= "Text1 * Text 2 (Text3)";
$str= explode(" ", $string);
echo $str[0]; // Text1
echo $str[1]; // *
echo $str[2]; // Text2
echo $str[3]; // (Text3)
$text = 'Text1 random rand rand * Text 2 lalalala text lalal (Text3 fiiigaro)';
// $matches[1] ще съдържа желания от теб стринг
preg_match('/^.*\s?\*\s?(.*)\s?\(/is', $text, $matches);