Jump to content


Photo

Cutting a variable to 10 characters


  • Please log in to reply
1 reply to this topic

#1 essjay_d12

essjay_d12
  • Members
  • PipPipPip
  • Advanced Member
  • 121 posts

Posted 29 March 2006 - 11:10 AM

How do I cut a variable down to 10 characters only, no matter how long it is originally?

so...
$test = 'Welcome to the Jungle';

would only print out....

Welcome to



Thanks

d

#2 Prismatic

Prismatic
  • Members
  • PipPipPip
  • Advanced Member
  • 503 posts
  • LocationSan Diego

Posted 29 March 2006 - 11:17 AM

$ShortString = substr($LongString, 0, 10);





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users