473,379 Members | 1,167 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

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
Jul 17 '05 #1
3 2413
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...

http://php.net/htmlentities

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

Regards,
Johan

Jul 17 '05 #2
"Johan Holst Nielsen" <jo***@weknowthewayout.com> wrote in message
news:3f**********************@dread14.news.tele.dk ...
mikel wrote:

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


Well? A way could be...

http://php.net/htmlentities

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
Jul 17 '05 #3
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 / 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


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 "@".

--
-- Rudy Fleminger
-- sp@mmers.and.evil.ones.will.bow-down-to.us
(put "Hey!" in the Subject line for priority processing!)
-- http://www.pixelsaredead.com
Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: barthome1 | last post by:
Hello, My company collects data from non-US sources. We are starting projects where this data will be output in an XML document and passed around to our applications and third party tools. ...
76
by: Zenobia | last post by:
How do I display character 151 (long hyphen) in XHTML (utf-8) ? Is there another character that will substitute? The W3C validation parser, http://validator.w3.org, tells me that this character...
2
by: Louise GK | last post by:
Hi there. I've written a simple program that makes a simple GET form with a text input box and displays $_GET when submitted. Using Windows Character Map, I pasted in the Cyrillic capital "Ya"...
15
by: pinkfog | last post by:
hi,all I write a snippet(in VC6.0 PLATFORM) to show the ASCII character ranging from 0-255. snippet: #include "stdafx.h" #include "stdio.h" #include "conio.h" int main(int argc, char* argv) {...
0
by: Nahash | last post by:
Hello everyone, I'm relatively new to Visual Basic. I have version 6. I was wondering if there was any way to display characters from another language (specifically Japanese characters) in a VB...
8
by: .Net Sports | last post by:
I am checking for text input on a form validation in javascript that required at least one numeric character along with any number of alpha characters for a given input text box. The below is a var...
4
by: dgiff33 | last post by:
Hello I am trying to display the characters |, /, - and \ one after the other in the same spot, disappearing and being replaced by the next character so that it looks like a spinning prompt. ...
11
by: =?Utf-8?B?UmF5IE1pdGNoZWxs?= | last post by:
Hello, I know I sound like a one-note Johnny on this but I'm still looking for a solution. I need to display characters coming in from a serial port or a socket. I also need to be able to type...
5
by: tushar.saxena | last post by:
This post is a follow up to the post at : http://groups.google.com/group/comp.lang.c++/browse_thread/thread/83af6123fa945e8b?hl=ug#9eaa6fab5622424e as my original question was answered there, but I...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.