take out the spaces and any special characters

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 31
Joined: Sat Jun 28, 2003 9:09 pm

Thu Jul 03, 2003 5:40 pm

how exactly would i edit this line to take out spaces and special charaters that might cause a problem when contained in the name of a file.


(Im new)

User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Fri Jul 04, 2003 5:53 am

This is the function to remove trailing and leading white spaces

Code: Select all

trim (string str [, string charlist])

you can use str_replace( " ", "", $str) this will replace all blank spaces by no space

Post Reply