kks_krishna Posted April 13, 2008 Share Posted April 13, 2008 HI, How can i get last character in a String? Quote Link to comment https://forums.phpfreaks.com/topic/100926-solved-how-to-get-last-character-in-string/ Share on other sites More sharing options...
trq Posted April 13, 2008 Share Posted April 13, 2008 <?php $s = "hello"; echo $s[strlen($s) -1]; ?> Quote Link to comment https://forums.phpfreaks.com/topic/100926-solved-how-to-get-last-character-in-string/#findComment-516117 Share on other sites More sharing options...
kks_krishna Posted April 13, 2008 Author Share Posted April 13, 2008 Thanks Quote Link to comment https://forums.phpfreaks.com/topic/100926-solved-how-to-get-last-character-in-string/#findComment-516123 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.