When I get data from my database and display it in a formfield so they can update the record, I am getting the record info fine, but have tones of trailing spaces. Am I doing something wrong?
@pyroOct 27.2004 — #[i]Originally posted by 96turnerri [/i]
[B]change
...
for
[code=php]preg_replace("/ /", "", $myrow['Company_Name'])[/code] [/B][/QUOTE]You think that's a good idea? Replacing all spaces? I'd use [URL=http://www.php.net/manual/en/function.trim.php]trim[/URL], for multiple reasons...
@96turnerriOct 27.2004 — #excuses excuses, and i got no excuse for not saying trim() i know, but i was posting that while i try to work out what is causing the problem (the whitespace), that would be a better fix
and o i just realised and i have slapped myself!, if
//Display Organized Results echo "ID: $ID<br>n"; echo "Username: $NT_Display_Name<br>n"; echo "View Company Payday: $Company_Payday<br>n"; echo "View Company Holiday: $Company_Holiday<br>n"; echo "View Live Helpdesk: $Help_Desk<p>n"; echo "Results Retrieved Successfully!n"; [/code]
How can I user "trim" when I'm organizing the results, or do I use trim when "echoing" the results, I've tried both but can't get it right, please help!
@96turnerriNov 07.2004 — #congrats, but what are the <br> and <p> doing there? is that just forum formatting errors, or do your results display like that