I am new in PhP so want to know that can I write a function in different file and how to include them Thank's for help me
Create a new php file and name it what you want too, (but for this example i'll use file.php): Then add the function into file.php like: <?php /* You can read up on creating functions @: http://php.about.com/od/learnphp/ss/php_functions_4.htm */ function functionname() { //what the function does... return; } ?> PHP: Then wherever you want to include the file add: <?php include("file.php"); ?> PHP: