How to add cfg file & read lines there & edit the lines?

) example :
read from hi.ini
PHP Code:
"hi" "www.hi.com
scan file & write in motd :
hi
( so there will be add this code : <p><a href="http://www.hi.com">hi</a></p> )
i think anything like this :
("<p><a href="%d">%d</a></p>", name, link) .
but how to have more then 1000 of this lines?so that we could add around 1000 "hi" "www.hi.com"in the file? so that our file could show so :
PHP Code:
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
motd shows :
hi
hi
hi
hi
hi
hi
hi
hi
hi
__________________