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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -