+2  A: 

left most

ltrim('text');

right most

rtrim('text');

but shortcut of above two is simply

trim('text');
Sarfraz
A: 

string trim ( string $str [, string $charlist ] )

This function returns a string with whitespace stripped from the beginning and end of str

pek
+3  A: 

Use trim to remove whitespace at the start and end of a string.

Gumbo
A: 

http://php.net/manual/en/function.trim.php would be your best choice

Fifth-Edition
A: 

Checkout PHP Trim.

Shoban