Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

having a blond moment

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

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
digitalbloke
New php-forum User
New php-forum User
 
Posts: 59
Joined: Tue Jul 01, 2003 7:02 am

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);
pootergeist
New php-forum User
New php-forum User
 
Posts: 191
Joined: Wed Jan 29, 2003 7:11 am
Location: UK

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

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

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

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


Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.