Hi I have a table in which my row contains the text which i retrieve from the database.But i have a small width of row and the data i retrieve is large.And the text exceeds the width of my row so i want to break the data i retrieve into multi lines inside the table row.How can i do it.
You could use the function wordwrap(). It wraps a string to a given number of characters using a string break character. or even you can use nl2br function if you are getting text from the table which is input in the table using multiline text box
I'd agree with him 100%. I'm still learning a lot with PHP but from what I know, this would probably be your best option. +1
I would suggest what was originally an IE only property from 15 years ago, that is now part of the CSS3 specification so all the "modern" browsers now support it. word-wrap:break-word; https://developer.mozilla.org/en-US/docs/Web/CSS/word-wrap "CSS3" property that works all the way back to IE 5.5 -- Fun stuff. (and about blasted time!!!)
Thats just an example. Its good when you have to work with stuff like this like comments, posts, quotes, etc...
In other words content, stuff that shouldn't ever have forced formatting on it in the markup since it should be in a dynamic layout. Just saying. Processing it server-side fixed was a stopgap for everything other than IE being a retard. Now that CSS3 has taken a decade and a half old IE5 value and made it official, and it's supported in any browser that actually matters (and a hell of a lot that don't) there's no reason to waste time on doing it via brute force. CSS3 -- the bleeding edge of what IE could do a decade and a half ago!
But he has a point overall, ie sucks even with js you have to do alot of stuff to get ie to work which can easily be done with other browsers. Now lets try to stay on topic =]