Jump to content


Photo

Statement like GOTO is available in PHP5?


  • Please log in to reply
2 replies to this topic

#1 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 19 April 2006 - 06:42 PM

i have a script with thousands of lines. if one condition was met then it should point the end of the script lines. means... after metting the condition php will execute the codings like include('footer.php'); is it possible???

www.karthi.us

#2 poirot

poirot
  • Members
  • PipPipPip
  • Advanced Member
  • 646 posts
  • LocationAustin, TX

Posted 19 April 2006 - 06:45 PM

Well, instead of doing this, you can abort script execution:

if (condition) {
   include 'footer.php';
   die();
}

~ D Kuang

#3 karthikeyan_coder

karthikeyan_coder
  • Members
  • PipPipPip
  • Advanced Member
  • 201 posts

Posted 19 April 2006 - 07:31 PM

Ahh Smart Idea. :)
www.karthi.us




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users