Guru
Guru

Reputation: 419

How can I escape the double quotes in "guru" in Zend form?

When I tried to populate data in Zend form "guru", it was returning \"guru\". How can I escape or remove the "" from the text field and populating form data without "" as guru?

Upvotes: 0

Views: 621

Answers (2)

Robert
Robert

Reputation: 1127

Use $str = str_replace(chr(132), '"', $str);.

Upvotes: 0

adlawson
adlawson

Reputation: 6431

Make sure you have Magic Quotes disabled in your php.ini file. They are marked deprecated in PHP 5.3 and are marked for removal in PHP 6 (possibly 5.4).

Use get_magic_quotes_gpc() to find out if it is enabled, and see magic_quotes_gpc option to find out how to disable.

// Are Magic Quotes enabled?
var_dump(get_magic_quotes_gpc());

If this returns true, open your php.ini file and make sure this line = Off

magic_quotes_gpc = Off

Upvotes: 3

Related Questions