Results 1 to 7 of 7

Thread: add dynamic link to truncate text

  1. #1
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default add dynamic link to truncate text

    i have this code that truncate a value passed to it if the text is greater than a certain number. What i want now is to be able to dynamically add a link to the truncate symbol ... so that users can click on that for more details. this is the _script_.

    $comment = $row_rsMyp_com['comment_com'];
    $output = substr($comment, 0, 75) ;
    echo $output .= "...";

    I want to now add a _link_ to the ... so that users can view all the message. Any help is appreciated.
    "...men are that they might have joy."
    Nephi

  2. #2
    Join Date
    Feb 2006
    Posts
    4,242
    Rep Power
    0

    Default

    Add it to the database and then build a query display it.
    |--- www.RealJamaicaEstate.com ™ ---|
    Invest small = small returns [micro enterprise] | Invest Big = returns Big [macro enterprise]
    --- www.fashionsJAMAICA.com ™ -|- www.ChampsJamaica.com

  3. #3
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default

    Well all i want to know is the syntax to wrap a link to the out putted "..." .
    "...men are that they might have joy."
    Nephi

  4. #4
    Join Date
    Feb 2006
    Posts
    4,242
    Rep Power
    0

    Default

    |--- www.RealJamaicaEstate.com ™ ---|
    Invest small = small returns [micro enterprise] | Invest Big = returns Big [macro enterprise]
    --- www.fashionsJAMAICA.com ™ -|- www.ChampsJamaica.com

  5. #5
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default

    well i tried this but is did not work. could you help a bit more with this?
    "...men are that they might have joy."
    Nephi

  6. #6
    Join Date
    Oct 2005
    Posts
    745
    Rep Power
    0

    Default

    Can't you output <a href="/page.php?string=somethingyoucanquery>....</a>
    3.14159265358979323846264338327950288
    4197169399375105820974944592307816406
    28620899862803482534211706798 pi 101

  7. #7
    Join Date
    May 2004
    Posts
    530
    Rep Power
    0

    Default

    No this does not work. remember i have to concatenate plus add link.
    "...men are that they might have joy."
    Nephi

Posting Permissions

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