BrianM Posted June 5, 2008 Share Posted June 5, 2008 Is there an alternate method to setting blank spaces in between table cells other than having to use over and over, like so <td><b>Site name: </b></td> EDIT: Better yet, is there a PHP function used to repeat a single HTML code like that multiple times? Maybe something like, some_function(string, x) where x represents how many times to repeat the string. EDIT: Guess I didn't look hard enough, did a Google search where I found it not even 10 seconds later... str_repeat(string,repeat) Quote Link to comment https://forums.phpfreaks.com/topic/108784-solved-whitespacing/ Share on other sites More sharing options...
.josh Posted June 5, 2008 Share Posted June 5, 2008 Most people use CSS for spacing things. As far as php code for repeating things: you would use a loop. for() foreach() do() while() for example: for ($x = 0;$x < 10; $x++) { echo " "; } // end loop // will echo out 10 of those things on the same line Quote Link to comment https://forums.phpfreaks.com/topic/108784-solved-whitespacing/#findComment-558057 Share on other sites More sharing options...
haku Posted June 5, 2008 Share Posted June 5, 2008 Css is definitely what you want here. Quote Link to comment https://forums.phpfreaks.com/topic/108784-solved-whitespacing/#findComment-558058 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.