Hi,
I have code that returns the following string..
:3:5:2:5
and I need to trim off the first : so it says
3:5:2:5
is there an easy way to do this?
Thanks,
Josh
Remove First Character In A String
Moderator: General Moderators
Got it working this way...
Is this best?
Code: Select all
$string = "e;:3:4:6:3:5"e;;
$length = (strlen($string) - 1);
echo substr_replace($string, '', 0, '-' .$length);- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
close
Code: Select all
$string = ":3:4:6:3:5";
echo substr($string, 1); // 3:4:6:3:5