Count Number of Occurrences of a Substring in a Given String using PHP July 16, 2021 PHP 0 Comments 318 Views substr_count function 123456<?php $text = '123 456 12 123'; $count = substr_count($text, '123'); echo $count; // 2
Leave a Comment
Cancel reply