Home >Backend Development >PHP Tutorial > 例如有这样一段文本,怎样将每行的值提取出来最有效率呢

例如有这样一段文本,怎样将每行的值提取出来最有效率呢

WBOY
WBOYOriginal
2016-06-13 12:32:28774browse

比如有这样一段文本,怎样将每行的值提取出来最有效率呢?
多行文本:

time=0
text=abcdefg
code=10


比如要想获取code的值10,或者每一行的值,感觉用正则是不是浪费cpu了?有更简单快捷的方法吗?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn