Solved

trimming text fields?

Posted on 2003-10-29
1
214 Views
Last Modified: 2008-03-06
hi all,

Iam using the following to show descriptions....>

<?php echo ($row_cat['Desc']); ?>


How evers i wish to limit it to 50 charcter....

been looking at chop but that seems the wrong method to me...

Thanks in advance

G

0
Comment
Question by:gabss
1 Comment
 
LVL 5

Accepted Solution

by:
LornaJane earned 26 total points
ID: 9642246
<?php echo (substr($row_cat['Desc'],0,50)); ?>

will hopefully do what you want.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now