@see http://book.cakephp.org/1.3/en/view/1469/Text
you mixed up the order if you do that before it will first truncate the link, of course. after you translated it to html you can truncate (setting html param to true) the result then. On 4 Feb., 16:34, Tomfox Wiranata <[email protected]> wrote: > hi, > > i have a long url like > > http://www.nytimes.com/2012/02/05/world/middleeast/syria-homs-death-t... > that i retrieve from an array $contact['value']; > > now i only want to show the first 30 characters without destroying the > link. when i do this > > $this->Message->createAutoLink($this->Text- > > >truncate($contact['value'], 25)); > > the hyperlink gets created an works, unless i truncate the string. and > this link comes out > > http://www.nytimes.com/2012... > > is truncate the wrong function? > > thanks a lot :) -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
