|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
Confirmed User
Join Date: Sep 2002
Posts: 654
|
PHP function to truncate a string...
Can someone please let me know which function I should be looking for to truncate a variable string to a set number of characters?
Ex. $string="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; function to truncate("$string", 5); echo function to truncate(); //Would output "ABCDE" Any assistance is appreciated. Thanks |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Jan 2005
Location: A Galaxy Far Far Away...
Posts: 144
|
I find your lack of truncated strings disturbing.
__________________
Everything is going according to plan. |
|
|
|
|
|
#3 |
|
Sofa King Band
Join Date: Jul 2002
Location: Outside the box
Posts: 29,903
|
substr ( string string, int start [, int length] )
|
|
|
|
|
|
#4 |
|
Registered User
Join Date: Jan 2002
Posts: 18
|
More info on it.
http://us4.php.net/manual/en/function.substr.php
__________________
|
|
|
|