Are you talking about getting rid of the space/tab/return characters at the end or beginning of a string? if so
trim(); is the function that you need.
You can also use ltrim() rtrim() to only strip the spaces from the beginning or end of a string.
Now if you are talking about deleting all " " (spaces) in a string use this code:
[php]<?php
$bodytag = str_replace(" ", "", "No Spaces In This String");
// Makes: NoSpacesInThisString
?>[/php]
