Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: Printing Html

  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Printing Html

    im learnin php, and have two questions, im used with perl in script programmin however i would like to migrate to php...

    i would like to know how to print large amounts of html without gettin all the print statements
    the code i used to use in perl was

    print <<HTML;

    CODE CODE $CODE CODE
    CODE CODE $CODE CODE
    CODE CODE $CODE CODE
    CODE CODE $CODE CODE

    HTML

    and it was done, my second question is that i can get data in to the script, get or post, in perl u need to parse input, but my php book which im readin, says that php does it automatically..

    haha thanks !!!
    Last edited by ricardovw; 03-08-2003 at 09:20 PM.

  • #2
    New Coder
    Join Date
    Jan 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    im runnin php through IISv5...

  • #3
    New Coder
    Join Date
    Jun 2002
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This is how you do Heredocument in PHP.
    print <<<END
    This uses the "here document" syntax to output
    multiple lines with $variable interpolation. Note
    that the here document terminator must appear on a
    line with just a semicolon no extra whitespace!
    END;
    Variables are parsed in Heredocument notation, so inthe example above, the value of $variable would replace the string '$variable' if you don't want this to happen you need to escape the $ by saying \$variable.
    It is true that variables are parsed automatically for you in PHP. You can use _GET['variablename'] to get stuff out of the query string. For instance, if your path was test.php?string=hello, the value of _GET['string'] would be "hello". The help files that you can download at php.net are really good, take a look at them.
    ~evlich

  • #4
    New Coder
    Join Date
    Jan 2003
    Posts
    15
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks the print statement work out fine, however the parse input thingy is still wrong, maybe i need to check something in my php.ini file... thanks alot though

  • #5
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,280
    Thanks
    4
    Thanked 83 Times in 82 Posts
    You can also find more information on this form previous posts:

    http://codingforums.com/search.php?s...der=descending
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •