How to Split words using php?

前端 未结 3 907
没有蜡笔的小新
没有蜡笔的小新 2021-01-16 20:39

I want to split a small word. My word is written bellow.

{you: awesome; feeling good}

I want to split above word to just get the word

3条回答
  •  一向
    一向 (楼主)
    2021-01-16 20:54

    $arr = explode(';', trim("{you: awesome; feeling good}", '{}'));
    $feel_good_string = trim($arr[1]);
    echo $feel_good_string;
    

提交回复
热议问题