explode function splits an array
书声
书声 2019-04-25 14:36:19
0
2
1374

Use the explode(":",$str) function to split the string -, if there is such data in $st [Transaction time: 2019-04-23 19:34:45] you want to get the complete data when splitting Time 2019-04-23 19:34:45, how to operate?

书声
书声

终会与你在人海相遇

reply all(2)
Alone88

QQ截图20190426143417.png

$str ='【交易时间:2019-04-23 19:34:45】';


$patt ='/【交易时间:(.*)】/';
$str1 = "";
$str2=preg_replace($patt,$str1,$str);

echo $str2;

One of the methods

But if the colon after your transaction time is in Chinese, you can directly intercept the Chinese colon

Alone88

Can be intercepted through regular expressions

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template