Anonymous user
Count occurrences of a substring: Difference between revisions
m
→{{header|PHP}}: Using PHP_EOL makes your code portable. It is translated to "\n", "\r\n" or "\r" depending on your OS.
m (→{{header|PHP}}: Using PHP_EOL makes your code portable. It is translated to "\n", "\r\n" or "\r" depending on your OS.) |
|||
Line 1,929:
=={{header|PHP}}==
<lang php><?php
echo substr_count("the three truths", "th"),
echo substr_count("ababababab", "abab"),
?></lang>
|