How to find the position of the first occurrence of a substring in a string?



How to find the position of the first occurrence of a substring in a string?..

Answer / Mintu Kumar

"To find the position of the first occurrence of a substring in a string, you can use the strpos() function in PHP. For example: strpos($haystack, $needle)."

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How can we increase execution time of a php script?

1 Answers  


Can we use include (?abc.PHP?) two times in a PHP page ?makeit.PHP??

5 Answers  


What is PHP?

8 Answers  


What does PEAR stands for?

1 Answers   Arigo Infotech,


What is the substitution of submit in PHP?

6 Answers   RedAlkemi,


Why is node js better than php?

1 Answers  


where do we use htaccess?

1 Answers  


Explain how does one prevent the following warning ‘warning: cannot modify header information – headers already sent' and why does it occur in the first place?

1 Answers  


What are php magic methods/functions?

1 Answers  


What do you mean range() in php?

1 Answers  


What is php call function?

1 Answers  


Explain the importance of the function htmlentities.

1 Answers  


Categories