How to create a function in PHP