php - how to explode date from this format by regex? -
i have entities such as:
📅 یکشبه، 20 فروردین (از 390000 تومان)
i want have "20 فروردین" @ first, separate them '20' , 'فروردین'.how such thing. speciallym wondering regex must use in php first level. thanks.
$str = ' یکشبه، 20 فروردین (از 390000 تومان)'; $str = explode(' ',$str); $date = $str[1].$str[2]; $price = $str[5]; use explode if string not complex!
Comments
Post a Comment