Re: Function

From: Date: Wed, 22 May 2002 04:24:52 +0000
Subject: Re: Function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98682@lists.php.net to get a copy of this message
On Wed, 22 May 2002 00:48:24 -0300 "Rodrigo" <tagzero@tagzero.com> wrote: > Hi guys I_m trying to use a function on na .inc file, how should I do? > > How should I write the function and what should I write on the file so > that the function file is _Included_ to be used on a function call on > the php file? in the file you want to include, lets call it inc.php, put.. <?php function blah(){ echo 'blah'; ?> then in your main file put <?php // include the file include("inc.php"); // now we can call the function normally just as if it was written // where the include statement is blah(); ?> ciao

« previous php.general (#98682) next »