<?php function f1() { ....Something here } function f2() { ... and something here } if( $_GET['func'] == 1 ) { function f1(); } else if( $_GET['func'] == 2 ) { function f2(); } ?>