How to use strcspn in PHP
In this article I will explain how strcspn function used in PHP.
strcspn() Function
This function gives us Position of the characters found in a string before any part of the string characters are found.
Syntax
strcspn(string,char,start,length) |
Example
<html>
<body>
<?php
echo strcspn("Hello Anjali!","a");
?>
</html>
</body> |
Output
You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here