Re: [PHP] Code contents of a function

2003-01-03 Thread Khalid El-Kary
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

Re: [PHP] Code contents of a function

2003-01-02 Thread Gerald Timothy Quimpo
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.

Re: [PHP] Code contents of a function

2003-01-02 Thread Shawn McKenzie
} > 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 >

RE: [PHP] Code contents of a function

2003-01-02 Thread Peter Houchin
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

[PHP] Code contents of a function

2003-01-02 Thread Shawn McKenzie
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"