Hi, I need to be able to remove the first character in a string like:
&one&two&three&four&five&six
but i need it to be like:
one&two&three&four&five&six
Can someone please help me?
| SitePoint Sponsor |
Hi, I need to be able to remove the first character in a string like:
&one&two&three&four&five&six
but i need it to be like:
one&two&three&four&five&six
Can someone please help me?
Pretty please?![]()
hi !
u can use substr command , here is some ex. :
hope this help uPHP Code:$rest = substr ("abcdef", 1); // returns "bcdef"
$rest = substr ("abcdef", 1, 3); // returns "bcd"
// Or
$rest = substr ("abcdef", -1); // returns "f"
$rest = substr ("abcdef", -2); // returns "ef"
$rest = substr ("abcdef", -3, 1); // returns "d"
![]()
Thank you, thank you, thank you!![]()

that's correct... for your example it will look like:PHP Code:$str = substr($str, 1, strlen($str)-1);

or just...PHP Code:$str = substr($str, 1);
Bookmarks