RE: [PHP-DB] HTML or PHP?

2001-10-02 Thread Beau Lebens

not that this has *anything* to do with databases, but try the nowrap
directive in the td containing the URL, i don't think it will work,
otherwise you will need to use something like the PHP function wordwrap()

enjoy

/beau

// -Original Message-
// From: Jason Caldwell [mailto:[EMAIL PROTECTED]]
// Sent: Wednesday, 3 October 2001 7:20 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] HTML or PHP?
// 
// 
// I have a problem that seems like it should be a snap to fix, 
// but leaves me
// feeling frustrated to no end...
// 
// I have a table (HTML) -- 2 Columns.  In the right-hand 
// column I store a URL
// (ie. http://someonesdomainname.com/path/anotherpath/file.html)
// 
// The problem is -- when I pull the URL in -- it *pushes* my 
// columns around
// and expands my table beyond the page -- I have my table hard 
// set at 600
// pixels (not 100%) --
// 
// How can I force the URL (or any text for that matter that 
// doesn't have
// spaces in it) -- to *wrap*??  Can I do this with HTML (I 
// hope) or do I need
// to write some PHP code to force break the string into 
// workable sections?
// 
// Thanks.
// [EMAIL PROTECTED]
// 
// 
// 
// 
// -- 
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: [EMAIL PROTECTED]
// For additional commands, e-mail: [EMAIL PROTECTED]
// To contact the list administrators, e-mail: 
// [EMAIL PROTECTED]
// 

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] HTML or PHP?

2001-10-02 Thread Dobromir Velev

Hi,
Just set the width of the cell the URL is placed in.
Something like
trtd width='300'$url/tdtd width='300'.../td/tr

HTH
Dobromir Velev

-Original Message-
From: Jason Caldwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 03, 2001 2:20 AM
Subject: [PHP-DB] HTML or PHP?


I have a problem that seems like it should be a snap to fix, but leaves me
feeling frustrated to no end...

I have a table (HTML) -- 2 Columns.  In the right-hand column I store a URL
(ie. http://someonesdomainname.com/path/anotherpath/file.html)

The problem is -- when I pull the URL in -- it *pushes* my columns around
and expands my table beyond the page -- I have my table hard set at 600
pixels (not 100%) --

How can I force the URL (or any text for that matter that doesn't have
spaces in it) -- to *wrap*??  Can I do this with HTML (I hope) or do I need
to write some PHP code to force break the string into workable sections?

Thanks.
[EMAIL PROTECTED]




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] HTML or PHP?

2001-10-02 Thread Matthew Loff


Without spaces, the URL won't line break...

I recommend one of two things...

1) Use a for() or while() loop with substr(), to print out, say, 50
characters per line, then break to the next line, until reaching the end
of the string...

2) Use an ellipsis (...) to cut out the middle of the URL if it's too
long...  Example:

echo A HREF=\$url\. (strlen($url)  50? substr($url, 0,
20).substr($url, -20) : $url) ./A\n;

That will shorten:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/long/url/goes/here/blah/blah/blah//A

To something like: 

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere...here/blah/blah/blah//A


If you wanted more accurate simplifying of URL displays with an
ellipsis, you could explode() the URL, using the slash '/' as the
delimeter...  But that's a bit more complicated to implement from that
point on...  Doing it that way, you could turn:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/long/url/goes/here/blah/blah/blah//A

Into:

A
HREF=http://www.somewhere.com/long/url/goes/here/blah/blah/blah/;http:
//www.somewhere.com/.../blah//A


Good luck with whatever method you choose.
--Matt


-Original Message-
From: Dobromir Velev [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 03, 2001 2:13 AM
To: Jason Caldwell; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] HTML or PHP?


Hi,
Just set the width of the cell the URL is placed in.
Something like
trtd width='300'$url/tdtd width='300'.../td/tr

HTH
Dobromir Velev

-Original Message-
From: Jason Caldwell [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Date: Wednesday, October 03, 2001 2:20 AM
Subject: [PHP-DB] HTML or PHP?


I have a problem that seems like it should be a snap to fix, but leaves

me feeling frustrated to no end...

I have a table (HTML) -- 2 Columns.  In the right-hand column I store a

URL (ie. http://someonesdomainname.com/path/anotherpath/file.html)

The problem is -- when I pull the URL in -- it *pushes* my columns 
around and expands my table beyond the page -- I have my table hard set

at 600 pixels (not 100%) --

How can I force the URL (or any text for that matter that doesn't have 
spaces in it) -- to *wrap*??  Can I do this with HTML (I hope) or do I 
need to write some PHP code to force break the string into workable 
sections?

Thanks.
[EMAIL PROTECTED]




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: 
[EMAIL PROTECTED]




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]