Thread: goto

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2000
    Location
    france
    Posts
    35
    Rep Power
    15
    is there a php equivalent to the BASIC function "goto"

    i.e. is there a possibility to include large portions of HTML between two php tags that allow (or not) to read it according to some condition ?

    Thanks

    -
    J0f
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    Nah. The closest you're gonna get to that would probably be switch(). PHP's language syntax closely resembles that of C and Javascript, no BASIC (except maybe variable assignment (I can't remember how strings were set in BASIC )).

    ------------------
    To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    24
    Rep Power
    0

    What you could do if you want to print out large plocke of HTML depenging of a condition is use the alternative syntax for the if statment
    <?
    if (This==That):
    ?>

    Print all the HTML you need

    <?
    else:
    ?>
    more HMTL

    ?>

    <?

    endif; #End the if statment

    ?>

    ------------------
    Aoeex,

    -http://www.aoeex.com

Similar Threads

  1. GOTO in php
    By mas_raka in forum PHP Development
    Replies: 6
    Last Post: January 24th, 2004, 02:20 PM
  2. Need quick image size hacks
    By ktoz in forum C Programming
    Replies: 4
    Last Post: December 17th, 2003, 05:14 AM
  3. Replies: 2
    Last Post: November 28th, 2003, 01:26 PM
  4. GOTO not in Python
    By JazzFusion in forum Python Programming
    Replies: 9
    Last Post: October 26th, 2003, 08:10 PM
  5. goto homepage after executing a script
    By ken72 in forum PHP Development
    Replies: 11
    Last Post: September 12th, 2002, 07:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo