Want to display &#__; characters

Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default Want to display &#__; characters

    Hello,

    I have several characters in my html code like / W and so
    on....
    The problem is, tehy are converted in HTML in their approbiate
    characters like @ is @ and F is F

    But I DONT want to display the F or the @ I want to display on my site
    the &# codes like @

    How can i do that?

    Thanks mikel
    mikel Guest

  2. Similar Questions and Discussions

    1. some Chinese characters can't display in the website
      We use CF7.0,and use sqlserver2000 as database,but in my website some chinese characters can't display correctly ,just display "?" or other letters...
    2. how to display unicode characters in datagrid
      Characters that are not 7-bit ascii don't display in a datagrid. Do I need a custom cell renderer? My dataprovider is xml data of the form:...
    3. Cannot display chinese characters on web page
      I have migrated all the data from MS Access 97 to MS Access 2000. For unknown reason, my ASP prgram can't retrieve any chinese characters on the...
    4. BUG: certain characters screw up QA display
      I'm connecting to a SQL7 SP4 server, and my local machine has SQL2000's Query Analyzer. I just noticed this bug related to returning an encrypted...
    5. how can I get Arabic characters to display within Dreamweaver?
      does anyone know the answer to this if so please help I would greatly appreciate it thnx.
  3. #2

    Default Re: Want to display &#__; characters

    mikel wrote:
    > Hello,
    >
    > I have several characters in my html code like / W and so
    > on....
    > The problem is, tehy are converted in HTML in their approbiate
    > characters like @ is @ and F is F
    >
    > But I DONT want to display the F or the @ I want to display on my site
    > the &# codes like @
    >
    > How can i do that?
    Well? A way could be...

    [url]http://php.net/htmlentities[/url]

    Or just str_replace('&', '&', $foo);

    Regards,
    Johan

    Johan Holst Nielsen Guest

  4. #3

    Default Re: Want to display &#__; characters

    "Johan Holst Nielsen" <johan@weknowthewayout.com> wrote in message
    news:3fcc98f5$0$9740$edfadb0f@dread14.news.tele.dk ...
    > mikel wrote:
    > >
    > > I have several characters in my html code like &#47; &#87; and so
    > > on....
    > > The problem is, tehy are converted in HTML in their approbiate
    > > characters like &#64; is @ and &#70; is F
    >
    > Well? A way could be...
    >
    > [url]http://php.net/htmlentities[/url]
    >
    > Or just str_replace('&', '&amp;', $foo);
    >
    > Regards,
    > Johan
    >
    This problem is not really related to PHP, it is a HTML issue, your browser
    reads those symbols as special characters when they are put next to
    eachother. So,

    Johan is right, the best way would probably be to do like this:

    echo htmlentities('&#70');

    --
    Thomas


    Thomas Kaarud Guest

  5. #4

    Default Re: Want to display &#__; characters

    Regarding this well-known quote, often attributed to mikel's famous "2 Dec
    2003 04:57:23 -0800" speech:
    > Hello,
    >
    > I have several characters in my html code like &#47; &#87; and so
    > on....
    > The problem is, tehy are converted in HTML in their approbiate
    > characters like &#64; is @ and &#70; is F
    >
    > But I DONT want to display the F or the @ I want to display on my site
    > the &# codes like &#64;
    >
    > How can i do that?
    >
    > Thanks mikel
    Basically, you have to escape the escape character... make the ampersand an
    ampersand, not a special character...

    HTML-code it &amp;#64; (using PHP, coding-it-like-that, however you want),
    and it'll display as "&#64;".

    --
    -- Rudy Fleminger
    -- [email]sp@mmers.and.evil.ones.will.bow-down-to.us[/email]
    (put "Hey!" in the Subject line for priority processing!)
    -- [url]http://www.pixelsaredead.com[/url]
    FLEB Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139