View Full Version : User-defined function library?

02-07-2003, 08:27 AM
Hi. I hope this is a quick and easy question for you guys. I'm trying to include() a php that just has function declarations. I hoped that could be a common resource for all my pages on the site. When I try to use the functions, however, it doesn't recognize them. Is there a way to make my own library or just include them properly? I'm open to suggestions. Thanks

02-07-2003, 02:39 PM
should be fine as long as the functions are included prior to the include call - and as long as the include is a php page and the contents surrounded by <?php ?> tags.

any class of functions would be used similarly - included and then called

function &doublit($arg)
$res = $arg*2;
return $res;

$blat = &doublit(12);
echo $blat;