php - repeat special character with str_repeat -


i want repeat special character or tab.

i try str_repeat(str, int)

//my function repeat function tab($num){     return str_repeat('&#09;', $num); }  //if call echo '<table>' . "\r\n"; echo tab(3) . '<tr>';  //the result <table> &#09;&#09;&#09<tr>; 

i have tried several ways single quote , double quote, results wrong

use \t printing tab

function tab($num){     return str_repeat('\t', $num); } 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -