Echo statement doesn't display in PHP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cinaritst
    New Member
    • Sep 2007
    • 1

    Echo statement doesn't display in PHP

    Hi
    This is probably the most basic question out there and I apologize before hand.
    None the less here goes. I am running Windows and ammplite package as server. Just doing simple programming- TOTAL NEWBIE! But I can't get the echo statement to display anything unless use <p> and then it ignores the ending </p> and prints down to ?>. Also the variable name is showing up not the value. I think it may be in the setup of xampplite or something. I have checked various syntax alternatives and even copied and pasted straight from a working program and still the same. HELP
  • gregerly
    Recognized Expert New Member
    • Sep 2006
    • 192

    #2
    Originally posted by Cinaritst
    Hi
    This is probably the most basic question out there and I apologize before hand.
    None the less here goes. I am running Windows and ammplite package as server. Just doing simple programming- TOTAL NEWBIE! But I can't get the echo statement to display anything unless use <p> and then it ignores the ending </p> and prints down to ?>. Also the variable name is showing up not the value. I think it may be in the setup of xampplite or something. I have checked various syntax alternatives and even copied and pasted straight from a working program and still the same. HELP
    I think I might know what's going on, but need to see your code before I can diagnose it properly.

    Post some code and I think I might be able to help you.

    Thanks,

    Greg

    Comment

    • Atli
      Recognized Expert Expert
      • Nov 2006
      • 5062

      #3
      Hi, and welcome to The Scripts!

      Like Greg, I could think of a few reasons, but like he says it would help to see your code.

      I will make one suggestion tho.
      If you are using '<? ... ?>' tags, try changing them to '<?php ... ?>'.

      Comment

      • pbmods
        Recognized Expert Expert
        • Apr 2007
        • 5821

        #4
        Heya, Cinaritst.

        What's the extension of this file? Is it .html or .php? Your server likely will only parse PHP in a file whose name ends with .php.

        Comment

        Working...