[Phpwm] ltrin inconsistency

Phil Beynon phil at infolinkelectronics.co.uk
Thu Jul 27 19:57:08 BST 2006


> > I've altered the code to;
> > substr_replace($myrow["big_name"],"",0,8);
> > which seems to work fine in all cases, but I'd still like to get my head
> > around why the other method failed some of the time.
>
> Try using basename instead?
>
> i.e. basename("path/to/file.php") -> "file.php".
>
> David.
>
> --
> David Goodwin
>
> [ david at codepoets dot co dot uk ]
> [ http://www.codepoets.co.uk       ]
>

Hi David,
I oversimplified it to highlight the ltrim() issue, there's too much going
on to simply use basename in this case.

Phil




More information about the Phpwm mailing list