jandrews3 Posted October 21, 2007 Share Posted October 21, 2007 How do I catch the end of a string from character 26 on when I don't know the total length. I want to do something like: $string = $validate(26, x) where x is the number of remaining characters in $validate after the 26th. Quote Link to comment Share on other sites More sharing options...
zq29 Posted October 21, 2007 Share Posted October 21, 2007 substr($x,26); Quote Link to comment Share on other sites More sharing options...
jandrews3 Posted October 21, 2007 Author Share Posted October 21, 2007 Sorry, I don't need the 27th character: substr($x,26); I need to capture the 27th character to the end of the string when I don't know the length. Quote Link to comment Share on other sites More sharing options...
Wes1890 Posted October 21, 2007 Share Posted October 21, 2007 substr($x,27,-1); read the php manual.. its explains your answer word for word.. gosh http://php.net/ search for substr Quote Link to comment Share on other sites More sharing options...
jandrews3 Posted October 22, 2007 Author Share Posted October 22, 2007 Wes1890, on a help forum you can stuff you attitude. If you're not here to help get off. If you read someone's post and can't reply without being a maldito, don't reply. I can do without the help of people like you. Signed: Someone apparently more mature than you read the php manual.. its explains your answer word for word.. gosh Quote Link to comment Share on other sites More sharing options...
Psycho Posted October 22, 2007 Share Posted October 22, 2007 jandrews3, You appear to be the one with the attitude. SemiApocalyptic's response is exactly what you asked for (i.e. captures everything from the 27th character to the end of the string). But instead of actually trying it out you posted back as if his response was incorrect, which seems presumptious. http://us.php.net/manual/en/function.substr.php Quote Link to comment Share on other sites More sharing options...
jandrews3 Posted October 22, 2007 Author Share Posted October 22, 2007 You got me there. I misread the code posted by SemiApocalyptic. You're absolutely right, I should have tried it. But my mistake was a combination of misunderstanding and being new, not disrespect. I am nothing if not respectful to people. Quote Link to comment Share on other sites More sharing options...
teng84 Posted October 22, 2007 Share Posted October 22, 2007 try substr($x,26,strlen($x)); Quote Link to comment Share on other sites More sharing options...
Wes1890 Posted October 22, 2007 Share Posted October 22, 2007 there is too much love going on in this thread.. lol Quote Link to comment 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.