Solved

remove last 4 chars of string

Posted on 2006-06-17
3
165 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
This article discusses how to create an extensible mechanism for linked drop downs.
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…

840 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