How to compare two strings in PHP?

Posted by Prem Tiwari | Updated on

Answer: Use the PHP strcmp() function

Want to compare two strings using PHP, use the PHP strcmp() function to compare two strings. Following is an example of compare two strings values using PHP:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers