|
Posted by Tom on 02/23/07 19:56
On 23 Feb 2007 10:44:23 -0800, laredotornado@zipmail.com wrote...
>
>Hi,
>
>A question for those of you who always seem to know the one line way
>of doing things. I'm using php 4.4.4 and I want to rename the first
>part of the file to a particular string. For example, if my input
>string were
>
>$input = "/path/to/my/file/12345.jpg";
>
>I would want my result to be "/path/to/my/file/header.jpg", assuming
>"header" was my fixed string.
>
>Any slick ways to do this?
>
>Thanks, - Dave
>
Maybe using the substr() function to get the parts of the path you need, then
piece them together with the text you need to add.
Tom
--
Newsguy.com
75+ days of Binary and Text Retention!
Higher levels of article completion!
Broader coverage of newsgroups
Navigation:
[Reply to this message]
|