How to Compare String length in PHP?
How to Compare String length in PHP?
Hi, I am a developer. I have been searching for best suited developer forum which provide helpful information on php development, so that I can get help from its active members to get good learning on how to compare string length in php programming. I have searched alot of forums but didn't get the fruitful answer. I am hoping to get my query resolved and also looking to get informative links of such more forums.
Re: How to Compare String length in PHP?
Have you tried a Google search for "How to Compare String length in PHP?"
Zvika Dror
Zend Support Team
Zend Support Team
Re: How to Compare String length in PHP?
How to tally the length of a PHP string? This capacity is required to check some shape approval likewise where any info field is entered clear. PHP work strlen does this work for us and returns number of characters inside the string including clear space. On the off chance that you need clear space to be evacuated then you can apply string supplant work str_replace to the string before applying strlen.
Re: How to Compare String length in PHP?
Int strcmp (string str1, string str2)ashi4275 wrote:Hi, I am a developer. I have been searching for best suited developer forum which provide helpful information on php development, so that I can get help from its active members to get good learning on how to compare string length in php programming. I have searched alot of forums but didn't get the fruitful answer. I am hoping to get my query resolved and also looking to get informative links of such more forums.
This function compares the two strings character-by-character (more precisely) and returns:
0 - if the lines completely match;
-1 - if string str1 is lexicographically smaller than str2;
1 - if, conversely, str1 "is greater than" str2.