as you may see, there is a double line break between the last </span> and the </td> which should not be there. How can i take it out? Below there is a temporary solution:
Because it doesnt look good in the source code. Im quite picky when it comes to presentation and that space just doesnt look right. I know many web developers dont care about how their code look but i do. I want it to comply with HTML tidy standards.
Read up on the trim function
the reference manual is an invaluable source of information, which reminds me of a neat extension I picked up for chrome, PHP Ninja Very useful tool
Thanks. I know the trim function but i think i fail to figure out how can use it so i can remove only and exactly the last break of the text. Actually i still dont understand why do i get that break since there is nothing between the last line of code and the EOF;
Spaces/Tabs/Line breaks and tidy html in general is a waste of bandwidth.
I personally prefer to strip everything unnecessary. Just make sure the code you write is clean.
Sorry if that doesn't help your current problem, but I gave up making the output looking pretty a long long time ago. I found that under different circumstances you needed some html to be more indented than in other places, what then?
I respect your preference and i know what you mean, but having a clean and readable code makes it easy to edit. Thats why i want it to comply with tidy standards.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Heredoc does some funky stuff with white spaces sometimes... Might be better to rethink what you have going on and use the more standard variable declaration using quotes and all...
You know... You're not so smart. Do you need me to educate you?
If you say, "please," (and do so, nicely) then I will show you where you're dead wrong.
The "EOF;" (or whatever string you choose) must be the only thing on its line (including no leading white-space).
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
The "EOF;" (or whatever string you choose) must be the only thing on its line (including no leading white-space).
Was worth a shot
Originally Posted by temp.user123
You know... You're not so smart. Do you need me to educate you?
If you say, "please," (and do so, nicely) then I will show you where you're dead wrong.
The "EOF" MUST be on it's own line, the semicolon can be 1000 lines down and not exclusively separated by \r, \n, and spaces. I put a ) there to close trim.
It does run...
I use (, ; : -) as I please- instead of learning the English language specification: I decided to learn Scheme and Java;
The "EOF" MUST be on it's own line, the semicolon can be 1000 lines down and not exclusively separated by \r, \n, and spaces. I put a ) there to close trim.
It does run...
I would only recommend on top of that to use rtrim instead, just incase leading whitespaces or tabs were required for formatting.
Bookmarks