PHP - Character Limit in a table array?

  • Thread starter Thread starter Jayy T
  • Start date Start date
J

Jayy T

Guest
So I have a list of people applying to be a staff member on my site, and it shows the people that have applied in a large table, and it shows the basics, username, gender, birthday, and comments staff has made (remember that one).

When you click on the application number, you can see everything that they filled out and at the bottom there is a text box that staff can write comments in ("i like them," "they're awfully young," etc.).

I have the comments showing on the list page, but I don't want it to be everything, cause the one column gets really big.

I tried the 'substr' thing to limit the $comm variable to 20 characters, but nothing happened. i don't know if you can even use that on a mysql_fetch_assoc. I want it to stop after about 20 chars, and have a '....' at the end, if possible.

Is there any way to only show the beginning of the staff comment? I dont know if i can change the variable, or can I limit the amount of text that the <td> will show?

I cant find anything online and i'm still fairly new to php. I've been using it for over a year, but this is the first time I'm actually writing my own codes to put into my site. =X

Thanks In Advance
 
Back
Top