【发布时间】:2014-11-21 11:44:15
【问题描述】:
我的 PHP 字符串如下所示:
$test1= ' 1 AAA vs SSS ';
$test2= ' 2 GGG vs FFF ';
我需要从字符串中提取 NUMBER 和名称:
[0] => stdClass Object
(
[no] => 1
[one] => AAA
[two] => SSS
)
我该怎么做?
【问题讨论】:
-
什么是数组,想要的输出?
-
正则表达式是一个很好的起点。到目前为止,您尝试了什么?
标签: php regex string str-replace explode