atement
>
> eg
>
> if ($var){
> myfunction();
> }
> else {
> sumotherfunction();
> }
>
> etc
>
>
> > -Original Message-
> > From: Shawn McKenzie [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, 3 January 2003 12:18 PM
> > To: [EMAIL PROTE
On Friday 03 January 2003 09:17 am, Shawn McKenzie wrote:
> I have a script with some functions and within the script I want to read
> the code from one of the functions into a string.
you'd probably have to fopen/fgets or file, and then parse for the function
start and end and read the contents.
}
> else {
> sumotherfunction();
> }
>
> etc
>
>
> > -Original Message-
> > From: Shawn McKenzie [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, 3 January 2003 12:18 PM
> > To: [EMAIL PROTECTED]
> > Subject: [PHP] Code contents of a function
>
so put it in a if or switch statement
eg
if ($var){
myfunction();
}
else {
sumotherfunction();
}
etc
> -Original Message-
> From: Shawn McKenzie [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 3 January 2003 12:18 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Code content
I have a script with some functions and within the script I want to read the
code from one of the functions into a string.
Example:
function myfunction() {
echo "something";
echo "something else";
someotherfunction();
}
I want to read:
echo "something";
echo "something else"
5 matches
Mail list logo