mendoz Posted January 12, 2007 Share Posted January 12, 2007 Hello again :o :o :o :oAlmost done with this thing:http://control-pc.co.il/products/testar.phpPlease go inside and check the hp one.see? instead of giving [i]h[/i]p it gives [i]h[/i].this is the code[code]<?php echo rtrim($files[$i],".jpg"); ?>[/code]What is wrong with me?! Link to comment https://forums.phpfreaks.com/topic/33906-rtrim-problem/ Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 try somin like this maybe... it'll cut off everything after the last . instead of off of a number or what all else :-)[code]<?function get_filename($filepath){ return substr($filepath, 0, strpos($filepath, strrchr($filepath, ".")));}?>[/code] Link to comment https://forums.phpfreaks.com/topic/33906-rtrim-problem/#findComment-159179 Share on other sites More sharing options...
mendoz Posted January 12, 2007 Author Share Posted January 12, 2007 works, thanks Link to comment https://forums.phpfreaks.com/topic/33906-rtrim-problem/#findComment-159187 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.