ricmetal Posted April 24, 2013 Share Posted April 24, 2013 hi all i'm getting tab spaces from a database query where the data is nothing but empty - no white spaces or anything (in the database) when i print out this supposedly empty data into textareas these get populated with tab spaces, and just the first row. i've tested the empty data with strlen and it returns zero. if i print any other data into the textarea (not brought in from the database) the tab spaces go away. any ideas to what is occurring? thanks Quote Link to comment https://forums.phpfreaks.com/topic/277242-getting-tab-spacing-as-data-from-database/ Share on other sites More sharing options...
Q695 Posted April 24, 2013 Share Posted April 24, 2013 Is there anything in the data field on that spot of the table? Quote Link to comment https://forums.phpfreaks.com/topic/277242-getting-tab-spacing-as-data-from-database/#findComment-1426252 Share on other sites More sharing options...
ricmetal Posted April 24, 2013 Author Share Posted April 24, 2013 no. Quote Link to comment https://forums.phpfreaks.com/topic/277242-getting-tab-spacing-as-data-from-database/#findComment-1426255 Share on other sites More sharing options...
mac_gyver Posted April 24, 2013 Share Posted April 24, 2013 (edited) it would take seeing the code that reproduces the problem to help you. a copy/paste of the 'view source' of the incorrect output would help too. do you have any javascript/jquery on the page that could be altering the textarea? edit: i'm going to guess that your <textarea> </textarea> tags have the tabs between them in your source code and when you output actual data they are after the data and get trimmed off or otherwise ignored. Edited April 24, 2013 by mac_gyver Quote Link to comment https://forums.phpfreaks.com/topic/277242-getting-tab-spacing-as-data-from-database/#findComment-1426271 Share on other sites More sharing options...
Solution ricmetal Posted April 24, 2013 Author Solution Share Posted April 24, 2013 yeh, i failed to realize that i had tabs in the source code and that could be messing up the textarea's content! thanks mg Quote Link to comment https://forums.phpfreaks.com/topic/277242-getting-tab-spacing-as-data-from-database/#findComment-1426281 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.