php to extract a string from double quote

前端 未结 6 2000
灰色年华
灰色年华 2020-12-05 03:08

I have a string:

This is a text, \"Your Balance left $0.10\", End 0

How can I extract the string in between the double quotes an

6条回答
  •  盖世英雄少女心
    2020-12-05 03:32

    Try this :

    preg_match_all('`"([^"]*)"`', $string, $results);
    

    You should get all your extracted strings in $results[1].

提交回复
热议问题