On November 5, 2001 11:57 am, OntheAve wrote: > Hi, > I have my file: begin.inc, from which I want to include a part in my > php page. I have included this part between the tags: > "<!--BeginPHP-->" & > "<!--EndPHP-->", but I can't have my loop working. > Here is What I have written: > > $FileName = "begin.inc"; > $Content = file($FileName); > $BeginIt = "<!--beginPHP-->"; > $EndIt = "<!--endPHP-->"; > > do { > if ($Key == $BeginIt) { > echo $Val; > } elseif ($Key == $EndIt) { > Break; > } > } while(list($Key,$Val) = each($Content) ); > > What is wrong with my script?
It looks like you are missing a newline at the end of the $BeginIt and $EndIt strings. Also, the dev list is generally for discussing issues regarding the development of PHP -- for general PHP questions, please post to the PHP General mailing list. See php.net/support.php for more information. -- Zak Greant PHP Quality Assurance Team http://qa.php.net/ "We must be the change we wish to see." - M. K. Ghandi -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]