about 9 years ago
Welcome to FindNerd. Today we are going to tell the way how we can reverse a string without using array_reverse function in php. Please have a look.
$string = "FINDNERD"; $count=array_sum(count_chars($string)); for($i=$count -1 ;$i>=0;$i--){ echo $string[$i]; } result : DRENDNIF
In above example we store the string in variable $string and count the length of the string. We are using a for loop to reverse the string. It is simple way to reverse the string. Hope it helps.
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)