Jump to content

rtrim() issue


glenelkins

Recommended Posts

Hi

 

lets say i have 2 vars like this:

 

$var1 = 'kernel.class.php';

$var2 = 'database.class.php';

 

I want to rempove the .class.php so:

 

$var1 = rtrim ( $var1, '.class.php' );

$var2 = rtrim ( $var2, '.class.php' );

 

Works fine! but when trimming the $var1  it comes back as 'kerne' not 'kernel'  but the $var2 is fine as 'database'  why is it removing the 'l' from $var1 ??

Link to comment
https://forums.phpfreaks.com/topic/145895-rtrim-issue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.