smartguyin Posted December 24, 2006 Share Posted December 24, 2006 I have a description for a product in my database... i want to call on 50 characters from the whole description of every product i have in the database.......I have using table where i'll be displaying all the products with their title and Description.... But as i description is too big... i want to call only 50 characters from the whole description of the product.I hope you guys have understand what i wanted to do.... if yes please help me...... Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 24, 2006 Share Posted December 24, 2006 In the query: Substring() http://dev.mysql.com/doc/refman/5.0/en/charset-result.htmlIn your PHP: substr() http://php.net/substr Quote Link to comment Share on other sites More sharing options...
smartguyin Posted December 24, 2006 Author Share Posted December 24, 2006 Yes i got it... i used substr() function which is more easy to use and very perfect as i thought.... thanks i used the info as you said from here http://php.net/substr Quote Link to comment Share on other sites More sharing options...
Jessica Posted December 24, 2006 Share Posted December 24, 2006 No problem.Hit the solved button ;) Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 24, 2006 Share Posted December 24, 2006 you also might want to learn about worwrap that will format br quite well ok. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.