Home  >  Article  >  Backend Development  >  PHP字符串处理有关问题

PHP字符串处理有关问题

WBOY
WBOYOriginal
2016-06-13 13:28:31879browse

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>
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