Script URL: Random text
Version of script: 1.0
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
I'm using this to display some testimonials as the 'quotes' and it works fine. Problem is that some testimonials are a tad longer than others and i'd like to limit the number of characters that it displays in order to create some consistency in how much space it takes up. What code would I need to put in place in order to limit the number of characters in the display?
Thanks in advance.
I wish to limit the number of characters displayed
-
- Posts: 2
- Joined: Mon Jul 12, 2010 10:10 pm
Open rantex.php in Notepad and just ABOVE line paste this
This code will limit the output to 50 chars (change 50 to the length you need).
Code: Select all
/* Output the image according to the selected type */
Code: Select all
$txt = substr($txt,0,50);
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools