Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

splitting myqsl output

Status
Not open for further replies.

ckennerdale

Programmer
Dec 23, 2000
158
GB
I have a myslq database and am out putting the text contained within the fields into html pages.

What I would like to do with my 'description' field to spilt the information into two columns for neater presentaion.

Obviously the length of the description varies from record to record.

I assume I will have to count words or characters in a string and when the specified amount is reached it outputs to a different column.

Any ideas anyone? Caspar Kennerdale
Senior Media Developer
 
hi,
u can make use of function substr($string,int start position,int length);
eg if u want to make column of 100 charactres
then $column1 = substr($string,0,100);
and column2 = substr($string,100,100) and so on
hope that will help u
spookie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top