TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,231
  • Total Topics: 21,353
  • Online today: 606
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 229
  • Total: 229

['short_subject'] question

Started by dannbass, November 01, 2007, 07:45:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

dannbass

Hi! How could I do to specify a length in the $topic['short_subject']
For example if I have
<a href="'.$topic['href'].'">'.$topic['short_subject'];

I did some search and found this
strlen(un_htmlspecialchars($topic['short_subject'])) > 18 ? htmlspecialchars(substr(un_htmlspecialchars($topic['short_subject']), 0, 18) . '...') : $topic['short_subject'];

But I don't know how implement both...
Thanks

This website is proudly hosted on Crocweb Cloud Website Hosting.