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 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 Share on other sites More sharing options...
mendoz Posted January 12, 2007 Author Share Posted January 12, 2007 works, thanks Link to comment Share on other sites More sharing options...
Recommended Posts