PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
actually thats not true, the link you sent specifies that it will remove characters as well. The ltrim function does remove what I need it to but it throws that warning, I'm not sure what it means or why its being thrown.
The second parameter is a character list and the .. means a range, such as a..z would strip characters from a to z. Assuming that you just want the filename, I would use basename().
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
jcafaro10 wrote:I'll look into basename(). How can I actually remove ".." then?
Several ways, substr_replace(), str_replace()... But if you want the filename portion of a path then that's what basename() is meant for.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.