Re: [PHP] php solution to html problem

2005-08-25 Thread Jasper Bryant-Greene
Aljaž Bizjak Zupanc wrote: I recommend using Smarty for wrapping: {$foo|wordwrap:30:"":true} That does the exact same thing as: print(wordwrap($foo, 30, '', true)); Which is much more convenient if you're not already using Smarty. Jasper -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] php solution to html problem

2005-08-25 Thread Aljaž Bizjak Zupanc
I recommend using Smarty for wrapping: {$foo|wordwrap:30:"":true} -- Regards, Aljaz mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php solution to html problem

2005-08-25 Thread Jasper Bryant-Greene
Richard Lynch wrote: PHP's wordwrap function may have an optional argument to FORCE it to never be wider than X characters, but I don't think so... http://www.php.net/wordwrap string wordwrap (string str [, int width [, string break [, bool cut]]]) "If the cut is set to 1, the string is alway

Re: [PHP] php solution to html problem

2005-08-25 Thread Richard Lynch
On Wed, August 24, 2005 9:09 am, Ross wrote: > I have a table which I put php data from a database. > > If i have a name 'thisisaveryverylongfirstname' the table stetches to > fit > the name. Is there any way I can force it to wrap to a fixed width of > 100px?? > > If I put a space in the text wr

Re: [PHP] php solution to html problem

2005-08-24 Thread Mark Rees
""Jay Blanchard"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] [snip] doesn't work CSS acts the same way with a long unbroken string. [/snip] Well, you have no way of determining how many pixels wide something can be with PHP. You might have to use JavaScript to break up the string

RE: [PHP] php solution to html problem

2005-08-24 Thread Jay Blanchard
[snip] doesn't work CSS acts the same way with a long unbroken string. [/snip] Well, you have no way of determining how many pixels wide something can be with PHP. You might have to use JavaScript to break up the string as the table is rendered. -- PHP General Mailing List (http://www.php.net/) T

Re: [PHP] php solution to html problem

2005-08-24 Thread John Ellingsworth
http://us2.php.net/manual/en/function.wordwrap.php -- Thanks, John Ellingsworth Project Leader Virtual Curriculum http://john.ellingsworth.org Ross wrote: I have a table which I put php data from a database. If i have a name 'thisisaveryverylongfirstname' the table stetches to fit the name.

RE: [PHP] php solution to html problem

2005-08-24 Thread Jay Blanchard
[snip] I have a table which I put php data from a database. If i have a name 'thisisaveryverylongfirstname' the table stetches to fit the name. Is there any way I can force it to wrap to a fixed width of 100px?? If I put a space in the text wraps. How can I do this at character 30 of the strin