parker-94 Posted August 31, 2010 Share Posted August 31, 2010 Hello, I would like to start by pointing out my PHP skills are limited, so I ask that any help you offer is noob-friendly On my forum, a PS3 forum, I would like to display their trophy cards automatically from PS3Trophycard.com Here's the URL's used by PS3Trophycard.com for reference: http://card.mmos.com/psn/profile/pa/r/parker-94/card.png I'm using phpBB to run my forum software, and have a custom field for determining their PSN ID, so usually replacing the "parker-94" part in the above URL with {postrow.POSTER_FROM}, which would automatically create the URLs. However, my issue is with the pa/r part of the URL. I need a code or script which reads the user's PSN ID, and takes the first two letters into one part, and then reads the third letter for the next bit, like so: http://card.mmos.com/psn/profile/[FIRST TWO LETTERS]/[THIRD LETTER]/[FULL PSN ID]/card.png I was wondering how I would go about doing so? Basically, I need PHP to read the first 2 letters of something, and then the third letter. Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/212178-need-help-coding-a-script/ Share on other sites More sharing options...
DavidAM Posted August 31, 2010 Share Posted August 31, 2010 Use the substr() function Link to comment https://forums.phpfreaks.com/topic/212178-need-help-coding-a-script/#findComment-1105760 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.