Home  >  Article  >  Backend Development  >  PHP 初学者

PHP 初学者

WBOY
WBOYOriginal
2016-06-13 12:10:41894browse

PHP 菜鸟求助
鄙人最近学习PHP,连接数据库这一块有个问题,请大神帮们解答。
问题:
如何显示一列中的部分内容?我们知道利用mysql_fetch_array()函数可以echo选择出的表的一列中的内容,但是我只想显示这一列的部分内容,比如前两句怎么办?

------解决思路----------------------
举例说明吧。
------解决思路----------------------
使用php的 substr()函数来取字符串

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
Previous article:除开referer信息Next article:简略说说PHP优化那些事