RE: [PHP] Nested page calls

From: Date: Sat, 19 Jul 2003 01:25:35 +0000
Subject: RE: [PHP] Nested page calls
Groups: php.general 
Request: Send a blank email to php-general+get-155863@lists.php.net to get a copy of this message
Nice workaround - thanks, I will use it if I don't think of a better option What I wanted was something along the lines of my file be defined like this: <?php function file1(arg1, arg2)) { ?> ... Some HTML stuff ... <?php if ($condition) { file1(...); } ?> ... Some HTML stuff ... <?php } ?> there is also the question what happened when I include this file from another file -I think the include should be at the top and then later on the file should simply call the function - much like H file in C lee -----Original Message----- From: Curt Zirzow [mailto:curt@zirzow.dyndns.org] Sent: þù 19 éåìé 2003 2:53þ To: php-general@lists.php.net Subject: Re: [PHP] Nested page calls Lee Elenbaas <lee@viareality.com> wrote: > I would like to perform nested page calls, where a page does conditional > includes to itself > The problem is how to avoid stepping over the variables not sure why but um.. $current_scope++; if ($condition) { include(__FILE__): } $scoped_vars[$current_scope]['varname'] = 'only for this file'; > > Is there a way to define the page or parts of it as a function and still > have the HTML sections of it editable by an html editor? That means without > using the print command to create the output. depends on the html editor, vi handles my html sections inside my functions pretty well.. Curt. -- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.501 / Virus Database: 299 - Release Date: 14/07/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.501 / Virus Database: 299 - Release Date: 14/07/2003

« previous php.general (#155863) next »