jonoc33 Posted November 28, 2008 Share Posted November 28, 2008 Say if I had a variable: $rank = "Fighters"; How would I get retrieve the last letter? Link to comment https://forums.phpfreaks.com/topic/134577-retrieving-the-last-letter-of-a-string/ Share on other sites More sharing options...
DarkWater Posted November 28, 2008 Share Posted November 28, 2008 <?php $rank = "Fighters"; echo substr($rank, -1); Link to comment https://forums.phpfreaks.com/topic/134577-retrieving-the-last-letter-of-a-string/#findComment-700739 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.