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('	', $num); } //if call echo '<table>' . "\r\n"; echo tab(3) . '<tr>'; //the result <table> 			<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
Post a Comment