Function


Read With Formatting | Free Open Source Tutorials Account

PHP Development
Thread: Function


tunnelvision
Ive got this code (below) in a page but when i call the function by clicking the link the number 1 displays have ne of you guys got a clue what ive done wrong and why does it display 1?


function admin_pages() {
switch($_GET['func']) {
case 'admincon':
echo include("admin/admin_conf.php");
break;
case 'adminnews':
echo include("admin/admin_news.php");
break;
}
}


cheers

roninblade
its echoing out the result of the include call - 1 since the include was succesfull.
read more about includes here -> http://php.net/include/