Jump to content


Photo

echo a certain amount of characters


  • Please log in to reply
1 reply to this topic

#1 Twentyoneth

Twentyoneth
  • Members
  • PipPipPip
  • Advanced Member
  • 118 posts
  • LocationGlasgow, KY

Posted 05 May 2006 - 01:50 AM

I would like someone to point me in the right direction, thats about it. Erm, I am wanting to display only a certain ammount of characters in a variable...

like this:
$var = "123456789123456789";

echo 1st 12 characters:

"123456789123"

#2 toplay

toplay
  • Staff Alumni
  • Advanced Member
  • 973 posts

Posted 05 May 2006 - 02:05 AM

substr()

[a href=\"http://us2.php.net/manual/en/function.substr.php\" target=\"_blank\"]http://us2.php.net/manual/en/function.substr.php[/a]





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users