having a blond moment

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

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

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

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

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);
avatar image based upon nasas apod (only updates if I post though)

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

Thu Aug 28, 2003 10:31 am

Image

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

Thu Aug 28, 2003 11:29 am

thanks

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 6 guests