PHP字符串处理有关问题

WBOY
Release: 2016-06-13 13:28:31
Original
883 people have browsed it

PHP字符串处理问题
如:$a = wap.^222 email.^22@sina.com url.^http://www.ss.com 

程序结果是3,3代表这个字符串有3个^,怎么实现谢谢了。

------解决方案--------------------

PHP code
$a = 'wap.^222 email.^22@sina.com url.^http://www.ss.com';
echo substr_count($a,'^'); <div class="clear">
                 
              
              
        
            </div>
Copy after login
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