concatenating < or > not working

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Milan Krejci

    #1

    concatenating < or > not working

    hello,
    if i do $replace='<'.$k ey.'>'; it doesnt work as expected! i'm a little
    confused any help?
  • Willem Bogaerts

    #2
    Re: concatenating &lt; or &gt; not working

    if i do $replace='<'.$k ey.'>'; it doesnt work as expected! i'm a little
    confused any help?
    What do you expect then and what is your result?

    --
    Willem Bogaerts

    Application smith
    Kratz B.V.

    Comment

    • Markus

      #3
      Re: concatenating &lt; or &gt; not working

      Milan Krejci schrieb:
      hello,
      if i do $replace='<'.$k ey.'>'; it doesnt work as expected! i'm a little
      confused any help?
      I don't see a problem there - you might want to post further
      information, about what you want to do, how the code looks like, what
      result is expected, and what the actual result is.

      <?php
      $key = 'key';
      $replace='<'.$k ey.'>';
      var_dump($repla ce);
      ?>

      The result is: string(5) "<key>"

      Which is as expected. Of course you need to check the HTML source, as
      your browser will display "<key>" as "", not being able to interpret the
      "key" tag.

      HTH
      Markus

      Comment

      • Captain Paralytic

        #4
        Re: concatenating &lt; or &gt; not working

        On 13 Jul, 08:46, Milan Krejci <r...@mail.czwr ote:
        hello,
        if i do $replace='<'.$k ey.'>'; it doesnt work as expected! i'm a little
        confused any help?
        "it doesnt work as expected!"

        Well, that tells us a lot.

        I guess you were expecting it to initiate a nuclear strike on Figi?

        No it doesn't do that.

        Or maybe you were expecting it to cook you a meal?

        No it doesn't do that.

        Try showing us what it does do and telling us what you expected it to
        do.

        Sheesh!

        Comment

        • Milan Krejci

          #5
          Re: concatenating &lt; or &gt; not working

          Markus napsal(a):
          Milan Krejci schrieb:
          >hello,
          >if i do $replace='<'.$k ey.'>'; it doesnt work as expected! i'm a
          >little confused any help?
          >
          I don't see a problem there - you might want to post further
          information, about what you want to do, how the code looks like, what
          result is expected, and what the actual result is.
          >
          <?php
          $key = 'key';
          $replace='<'.$k ey.'>';
          var_dump($repla ce);
          ?>
          >
          The result is: string(5) "<key>"
          >
          Which is as expected. Of course you need to check the HTML source, as
          your browser will display "<key>" as "", not being able to interpret the
          "key" tag.
          >
          HTH
          Markus
          sheesh i'm a retard. i didn't realize that! :) cheers mate.

          Comment

          Working...