AV1611 Posted June 28, 2006 Share Posted June 28, 2006 I have a odbc query that returns all the field @ field lenthfor example if the field length is 10, and the data is "abc efg" it echos out "abc efg "how can I remove all the trailing spaces without removing the spaces in the data?str_replace(' ','',$row['insptype']) is no good because it also removes the space in the data...???thanks Quote Link to comment https://forums.phpfreaks.com/topic/13118-remove-padding/ Share on other sites More sharing options...
Wildbug Posted June 28, 2006 Share Posted June 28, 2006 trim() or rtrim() Quote Link to comment https://forums.phpfreaks.com/topic/13118-remove-padding/#findComment-50444 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.