Ti suggerisco di iniziare leggendo il manuale ufficiale:

http://www.php.net/str_repeat
http://www.php.net/echo
http://www.php.net/print