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

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

WBOY
Release: 2016-06-13 12:32:28
Original
771 people have browsed it

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

time=0
text=abcdefg
code=10


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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template