having a blond moment

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

digitalbloke
New php-forum User
New php-forum User
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

having a blond moment

Postby digitalbloke » Thu Aug 28, 2003 7:37 am

Hi all, i cant remember how to chop the last 4 char of a string??? someone remind me!


Thanks

User avatar
pootergeist
New php-forum User
New php-forum User
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK
Contact:

Postby pootergeist » Thu Aug 28, 2003 10:30 am

you wanna keep the last four

$arg = substr($string,-4);

or lose the last four

$arg = substr($string,0,-4);

User avatar
swirlee
Moderator
Moderator
Posts: 2272
Joined: Sat Jul 05, 2003 1:18 pm
Location: A bunk in the back
Contact:

Postby swirlee » Thu Aug 28, 2003 10:31 am


digitalbloke
New php-forum User
New php-forum User
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

Postby digitalbloke » Thu Aug 28, 2003 11:29 am

thanks


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest

cron