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 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() Link to comment https://forums.phpfreaks.com/topic/13118-remove-padding/#findComment-50444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.