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

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -