eek! I forgot the code to add a symbol after X chars.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Dale
Forum Contributor
Posts: 466
Joined: Fri Jun 21, 2002 5:57 pm
Location: Atherstone, Warks

eek! I forgot the code to add a symbol after X chars.

Post by Dale »

Yeah i forgot...

Say you have

Code: Select all

<?php
$value = "123456789";

echo "$value";
?>
What was it again to have it echo the value 123,456,789 or 123.456.789, ect...
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

User avatar
wwwapu
Forum Contributor
Posts: 197
Joined: Wed Apr 07, 2004 11:57 am
Location: Turku, Finland

Post by wwwapu »

Or if you are not dreaming only of nice bank account you can use wordwrap()

Code: Select all

$value = "123456789";
print wordwrap($value, 3, ".",1);
Post Reply