faqts : Computers : Programming : Languages : PHP : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 3 people (0%) answered Yes
Recently 0 of 3 people (0%) answered Yes

Entry

If I want to put x-number of blank spaces between 2 words, what would the PHP code be?

Jul 19th, 2004 23:30
Alder Rus, Matt Chatterley, LeRoy, http://www.directoryonclick.com , http://www.singapore-yellow-pages.com


Fairly simple to do!
use the str_repeat() function, e.g:
$sWithSpaces = $sOne . str_repeat(" ", $iNumSpaces) . $sTwo;