Home > Backend Development > PHP Tutorial > php获取数组的个数?

php获取数组的个数?

WBOY
Release: 2016-06-23 14:20:18
Original
914 people have browsed it

地址1|/file/1.flv$$$$ 地址2|/file/ddd.flv$$$$ 地址3|/file/333.flv$$$$ 地址4|/file/6-3.flv$$$$

问大家一下如何获得这个数组的个数?也就是有几个地址。


回复讨论(解决方案)

只需要个数的话
echo substr_count('地址1|/file/1.flv$$$$地 地址2|/file/ddd.flv$$$$ 地址3|/file/333.flv$$$$ 地址4|/file/6-3.flv$$$$', '地址');

如果地址“1|/file/1.flv$$$$地 地址2|/file/ddd.flv$$$$ 地址3|/file/333.flv$$$$ 地址4|/file/6-3.flv$$$$”是在mysql数据库中呢?

你终归要把数据从数据库里读出来。
你数据库里的结构是什么样子?

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