Solved

remove last 4 chars of string

Posted on 2006-06-17
3
161 Views
Last Modified: 2006-11-18
how to do the above?
0
Comment
Question by:ellandrd
  • 2
3 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
Comment Utility
$str = substr($str, 0, strlen($str)-4);

-r-
0
 
LVL 16

Author Comment

by:ellandrd
Comment Utility
i tried that...

my code:

<a href="'.PAGE_1_FILENAME.EXTENSION.'" title="'.substr(PAGE_1_FILENAME,0,strlen(PAGE_1_FILENAME)-4).'" accesskey="'.PAGE_1_ACCESS_KEY.'">'.PAGE_1_FILENAME.'</a>
0
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
That should work fine.

-r-
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now