php - Strip hidden whitespace from string -


i have string 35 displayed characters string's length 36 due kind of whitespace @ end of string. how can rid of kind of 'hidden' character (whose hex-code representation 08) ?

var_dump($string) gives string(36) "2014/08/8609249656_f478108e0e_h.jpg"

hex-code of $string: 323031342f30382f383630393234393635365f663437383130386530655f682e6a706708

hex-code of string desired (without 08 @ end). 323031342f30382f383630393234393635365f663437383130386530655f682e6a7067

i can't manually shorten string, cause strings not have 'hidden' character @ end. also, trim() not work.

you add character trim()'s character mask:

trim($string, " \t\n\r\0\x0b\x08"); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -