Alexej Kubarev
New member
set magic_slashes in PHP.ini to on and your problems will be solved... however its safer to save everything to DB with addslashes and when you get something from DB strippslashes before output
AlGale said:I am pulling some info from a database, and it is being displayed fine on the web site. However, I am using the exact same info for the Alt Tags, and only the first word is being displayed. Do I need to use add slashes and strip slashes, or htmlspecial chars, or is there something else I am missing?
<... alt="this"name"..>
$string = str_replace('\'', ''', $string);
$string = str_replace('\"', '"', $string);
AlGale said:Hi ruturajv - thanks for the reply.
Howevre, what is happening is that the data pulled from the database is appearing fine on the site, eg it pulls through "This is an image of a pyramid" for example, and correctly displayes it under the image - trying to send the exact same variabe through to the ALT tag howevre, displays simply "This" - addslashes and stripslashes has no effect at all - I still end up with only the first word being displayed!
Can anyone help?
Cheers guys
alt='This "some" text'
alt="This 'some' text"