SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Too much text!

  1. #1
    SitePoint Zealot
    Join Date
    Aug 2001
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Too much text!

    hi, does anyone know of a way using PHP/MySql to limit the return of text from a field in a table?

    example, i have a field in a database with a ton of text, but i only want to display the first 25 characters. is there an easy way to do this?

    -thanks
    __________________________
    http://www.michaelsica.com

  2. #2
    SitePoint Wizard johnn's Avatar
    Join Date
    Mar 2001
    Location
    Southern California, USA
    Posts
    1,181
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try

    aField = substr(aField,0,25);

  3. #3
    SitePoint Zealot
    Join Date
    Aug 2001
    Posts
    114
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks!
    __________________________
    http://www.michaelsica.com


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •