how can i display PHP code in a text field witout it bein executed?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • p3rsian
    Confirmed User
    • Sep 2003
    • 1050

    #1

    how can i display PHP code in a text field witout it bein executed?

    i want to show a code in a page of my site that can be copy n paste but its runnin the code even when i put in text field

    and is there way to make 1 php code within it be executed while the rest is not? i want it to echo a variable within the php code

    thank u
    boro en harfa chei
  • p3rsian
    Confirmed User
    • Sep 2003
    • 1050

    #2
    n e 1
    p l z
    boro en harfa chei

    Comment

    • WarChild
      Let slip the dogs of war.
      • Jan 2003
      • 17263

      #3
      Sorry that's haram.
      .

      Comment

      • cLin
        Registered User
        • May 2009
        • 94

        #4
        http://tinyurl.com/l5hvzt
        Chris
        The Ex Girlfriend Pics

        Comment

        • quantum-x
          Confirmed User
          • Feb 2002
          • 6863

          #5
          ever tried using <? your code ?>
          PrettyInCash.com - BoozedGFs.com - TeenGFs.com - JizzGFs.com- MilfUploads.com -

          Comment

          • who
            So Fucking Banned
            • Aug 2003
            • 19593

            #6
            Put it inside a textarea, and encode it first.

            Comment

            • rowan
              Too lazy to set a custom title
              • Mar 2002
              • 17393

              #7
              echo "<" . "?php\n";
              ?>
              <your code here... don't include the leading and trailing ?php tags>
              <?php
              echo "?" . ">\n"

              Be aware that if your displayed code has any HTML in it the browser will probably eat it up.

              Comment

              • scouser
                marketer.
                • Aug 2006
                • 2280

                #8
                use
                highlight_string("<? echo $test; ?>");

                Comment

                • scouser
                  marketer.
                  • Aug 2006
                  • 2280

                  #9
                  http://us2.php.net/manual/en/functio...ght-string.php

                  (assuming you want to do what i think you want to do)

                  Comment

                  Working...