Jump to content

Archived

This topic is now archived and is closed to further replies.

Twentyoneth

echo a certain amount of characters

Recommended Posts

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"

Share this post


Link to post
Share on other sites
substr()

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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.