Jump to content

DallasNYC

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Everything posted by DallasNYC

  1. Thanks solaris, I am aware of trim() and other ways to remove the whitespace. I'm trying to learn ways to prevent it from happening in the first place. I'm curious if someone can enlighten me more about this issue? Is there more documentation/articles about what other things could result in whitespace being added to a string?
  2. Hi, I spend alot of my time over at flashkit.com dealing mostly with flash. But I was recently involved with a thread dealing with PHP adding unwanted white space to a string. It turns out that if an extra line is left after the PHP closing tag, a space could get added to the string... [!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] In php, if you are using an editor that has line numbers you may have something like this: 66 echo 'response=passed'; 67 ?> 68 You would need to remove line 68. PHP sees that as output. Your script should end as this: 66 echo 'response=passed'; 67 ?> And no extra line. I can replicate this issue and solve this issue just by changine the above code around.[/quote] [a href=\"http://flashkit.com/board/showthread.php?t=675912\" target=\"_blank\"]http://flashkit.com/board/showthread.php?t=675912[/a] Ive only done a little PHP coding, but this interest me because I never read anything about this. I'm curious if someone can enlighten me more about this issue? Is there more documentation/articles about what other things could result in whitespace being added to a string? (I did a search for 'white space' etc, but came up with too many results) Recently there is a new thread with another person having problems with added whitespace to thier strings.. [a href=\"http://flashkit.com/board/showthread.php?t=676326&page=2&pp=20\" target=\"_blank\"]http://flashkit.com/board/showthread.php?t...26&page=2&pp=20[/a] I notice that in this particular issue, the author follows the echo tag with a "//" remark tag, but was not certain if that would cause the same white space issue? Thanks so much, Dallas
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.