Reply to Re: need help with generating html source from the php

Your name:

Reply:


Posted by Sanders Kaufman on 09/27/07 14:23

"Shelly" <sheldonlg.news@asap-consult.com> wrote in message
news:13fnapid7bhrdb9@corp.supernews.com...
> "Sanders Kaufman" <bucky@kaufman.net> wrote in message

>> You could probably resolve your issue by finding the place in the code
>> where the META tag is generated and then to use a conditional
>> (if-the-else) to generate the appropriate line.
>
> An interesting question occurred to me. Using the if statement outlined
> previously in this thread, what happens with the echo when the desired
> language reads from right to left and not left to right?

I tend to buffer my echos until a block is fully composed.
I think there's a bunch of "ob****" stuff in PHP for that, but I just use a
variable.

Thus, the answer to your question is to do it like this:
[code]
if($sLanguage == "english"){
$sMessage = "Good God, almighty!";
} else {
$sMessage = "Allah akbar!";
}
echo $sMessage;
[/code]


> Is it simply that the entire string is captured in the quotes and so
> appears on the screen as right to left? If that is the case, then what
> happens with word wrap?

I don't understand the question.
You had me up until word-wrap.
When you echo a string, as shown - it spits the result out to std_out as
composed.
There's no word-wrap unless the client is doing something like that.
Does that help answer the question?


> Wouldn't it then break at the beginning of the sentence rather than in the
> middle? (I have only worked on English sites).

Huh? Not in any context I can think of.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация