Solved

remove last 4 chars of string

Posted on 2006-06-17
3
163 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
ID: 16927243
$str = substr($str, 0, strlen($str)-4);

-r-
0
 
LVL 16

Author Comment

by:ellandrd
ID: 16927254
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
ID: 16927259
That should work fine.

-r-
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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…

813 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

18 Experts available now in Live!

Get 1:1 Help Now