Welcome Guest, Not a member yet? Register   Sign In
View code that hurts your brain
#5

[eluser]Randy Casburn[/eluser]
[quote author="xwero" date="1219437733"]DWYK??? [/quote]

Sorry...meant UWYK from http://ellislab.com/forums/viewthread/88487/ :red:

[quote author="xwero" date="1219437733"]And if a site goes multilanguage isn't it better to create language dependent views instead of making each individual text language dependent? What happens if an individual text in one language must be split in more pieces to have the same meaning?[/quote]

Really? A view for every possible language you want to support? You can't mean that. Is that what you really mean?

[quote author="xwero" date="1219437733"]And the question remains what if you want to use tags in the string
Code:
<p>&lt;?php echo '<span class="fn">Full Name: '.$user['firstname'].' '.$user['lastname'].'</span><br><span class="email">Email: '.$user['email'].'</span>';?&gt;</p>
Then you have tags in and outside php. I don't think that is a very good idea because it's inconsistent.[/quote]

I can't imagine putting any HTML tags into my PHP unless it is necessary part of the page generation. But that's a convention thing for me...and a personal preference. Maybe something I've learned. Cuts down on the spaghetti code in the code block above. Wouldn't do it.

So I suppose I'm trying to keep my mind open to all kinds of coding styles. Maybe the blog entry was solely demonstrative. But...

[quote author="xwero" date="1219437733"]... isn’t it more logical to put stings outside the php code?[/quote]
Yea...I'm with you on this.

@Hannes - Sounds like fun - benchmark this page up. I'd like to see how many nanoseconds we're different. I can see this leading to the inevitable "double quotes are slow" performance debate. Fun.


Messages In This Thread
View code that hurts your brain - by El Forum - 08-22-2008, 03:32 AM
View code that hurts your brain - by El Forum - 08-22-2008, 08:22 AM
View code that hurts your brain - by El Forum - 08-22-2008, 09:42 AM
View code that hurts your brain - by El Forum - 08-22-2008, 10:45 AM
View code that hurts your brain - by El Forum - 08-22-2008, 12:37 PM
View code that hurts your brain - by El Forum - 08-22-2008, 02:28 PM
View code that hurts your brain - by El Forum - 08-22-2008, 04:10 PM
View code that hurts your brain - by El Forum - 08-22-2008, 04:42 PM
View code that hurts your brain - by El Forum - 08-22-2008, 06:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB