jpratt Posted September 13, 2006 Share Posted September 13, 2006 I have a string varible containing about 20-30 characters. I neet to trim off the first 12 characters of the string variable. I have found a half dozen trim functions but none that do what i want. Does someone know what does this? its probably easy, just need a function or something. Quote Link to comment Share on other sites More sharing options...
Destruction Posted September 13, 2006 Share Posted September 13, 2006 Have you looked at substr?[code]<?php$str = $_GET['str'];$trimmed = substr($str, 12);?>[/code]This should return anything after the first 12 characters.HTHDest Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted September 13, 2006 Share Posted September 13, 2006 You need to use the [url=http://www.php.net/substr]substr()[/url] function. Ken Quote Link to comment Share on other sites More sharing options...
jpratt Posted September 13, 2006 Author Share Posted September 13, 2006 Thanks, works great. 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.