Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How does php handle the "&" in string?

Status
Not open for further replies.

dmkAlex

Programmer
Nov 25, 2005
66
0
0
US
Some of the descriiptions in one of the table contain the ampersand
sign &. When I do a "echo $Desc" in php, it cuts off at the & and the
rest of the string is omitted.

Is there any work around?


Thanks.
 
Ampersands "&" are treated like any other character when they are part of a string. PHP should not be cutting the text at the ampersand.



----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
I suppose that you use php to display html page.
Check in the source of generated page for '&'.
In html '&' you should write as '&'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top