【发布时间】:2019-06-20 15:50:29
【问题描述】:
我有一个 php 字符串中的文本文件的内容。现在我想存储出现在以下字符串之前的两个字符 - "(A)","(B)","(C)","(B+)"
例如,如果 php 变量包含类似 -
33(F) 15352(1) 24 31 55(B+) 15360(1) 6 32 38 70(A) 2 3 4 5 6 7 8 9 10
10
*Passed with Grace Marks
*SID: Student ID; SchemeID: The scheme
applicable to the student.
Date on which pdf made: 09/10/2018
RTSID: 2018100901520151640002
然后我想将 33,70 存储在一个数组中。 请注意,我要创建一个数值数组。
【问题讨论】:
-
你能解释一下吗?我不明白
33,70的欲望输出如何?不应该是55,70吗? -
我只是举个例子。就像“(F)”,“(A)”之前的每两个字符一样。所以输出将是 33,55,70
标签: php arrays string string-matching