need help with generating html source from the php

This is a discussion on need help with generating html source from the php within the PHP Language forums, part of the PHP Programming Forums category; "macca" <ptmcnally@googlemail.com> wrote in message news:1190903345.329646.114740@w3g2000hsg.googlegro ups.com... > ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #11 (permalink)  
Old 09-27-2007
Sanders Kaufman
 
Posts: n/a
Default [OT - CSS] Re: need help with generating html source from the php

"macca" <ptmcnally@googlemail.com> wrote in message
news:1190903345.329646.114740@w3g2000hsg.googlegro ups.com...
> Never worked with anything but English but I do know that text
> direction can be controlled with CSS e.g.
>
> p {
> direction:rtl;
>
> text-align:right
> }


That's so error-prone, it should be considered a bug, rather than a feature.
Browsers in languages that stream right-to-left already perform that
function.
So, if you use it the way you did, it'll switch the text back around the
wrong way.

Where that *is* useful is in proprietary HTML extensions, like
"<mymenu></mymenu>" which are not defined in the HTML/XHMTL spec.



Reply With Quote
  #12 (permalink)  
Old 09-27-2007
Shelly
 
Posts: n/a
Default Re: need help with generating html source from the php


"Sanders Kaufman" <bucky@kaufman.net> wrote in message
news:o1PKi.9168$JD.5519@newssvr21.news.prodigy.net ...
> "Shelly" <sheldonlg.news@asap-consult.com> wrote in message
> news:13fnapid7bhrdb9@corp.supernews.com...
>> 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?


As one example, if you have a table of fixed column width and allow
multi-line (a not uncommon situaton), then the text will wrap. What happens
if that text is supposed to be right to left? Treating it all as a one left
to right string will cause it to wrap incorrectly. Does that help you
understand 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.


"ggg fff eee ddd ccc bbb aaa" will wrap as, for example,

"ggg fff eee ddd"
"ccc bbb aaa"

because it assumes left to right. In a right to left language, aaa is the
the first word, bbb the second, etc. We would want it to wrap as:

"ddd ccc bbb aaa"
" ggg fff eee"

That is what I meant. How does one make that kind of thing happen. A
simple echo will wrap incorrectly.

Shelly

>
>
>



Reply With Quote
  #13 (permalink)  
Old 09-27-2007
Shelly
 
Posts: n/a
Default Re: need help with generating html source from the php


"macca" <ptmcnally@googlemail.com> wrote in message
news:1190903345.329646.114740@w3g2000hsg.googlegro ups.com...
> Never worked with anything but English but I do know that text
> direction can be controlled with CSS e.g.
>
> p {
> direction:rtl;
>
> text-align:right
> }
>


Now THAT answers my question!

Shelly


Reply With Quote
  #14 (permalink)  
Old 09-27-2007
Shelly
 
Posts: n/a
Default Re: [OT - CSS] Re: need help with generating html source from the php


"Sanders Kaufman" <bucky@kaufman.net> wrote in message
news:aKPKi.952$4V6.418@newssvr14.news.prodigy.net. ..
> "macca" <ptmcnally@googlemail.com> wrote in message
> news:1190903345.329646.114740@w3g2000hsg.googlegro ups.com...
>> Never worked with anything but English but I do know that text
>> direction can be controlled with CSS e.g.
>>
>> p {
>> direction:rtl;
>>
>> text-align:right
>> }

>
> That's so error-prone, it should be considered a bug, rather than a
> feature.
> Browsers in languages that stream right-to-left already perform that
> function.


.....and that also answers my question!

Shelly


Reply With Quote
  #15 (permalink)  
Old 09-28-2007
Sanders Kaufman
 
Posts: n/a
Default Re: need help with generating html source from the php

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


>>> 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?

>
> As one example, if you have a table of fixed column width and allow
> multi-line (a not uncommon situaton), then the text will wrap. What
> happens if that text is supposed to be right to left? Treating it all as
> a one left to right string will cause it to wrap incorrectly. Does that
> help you understand the question?


Yeah, I think so.
But for that - you're best answer can be found in the PHP docs at PHP.net -
if you're using PHP's wordwrap thingy.
I don't use it much.


> because it assumes left to right. In a right to left language, aaa is the
> the first word, bbb the second, etc. We would want it to wrap as:
>
> "ddd ccc bbb aaa"
> " ggg fff eee"
>
> That is what I meant. How does one make that kind of thing happen. A
> simple echo will wrap incorrectly.


You'll probably have to create your own function for that.
I don't think PHP is *that* internationalized yet.


Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0