Hello there,
I have a problem with encoding an array retrieved from DB. I use this:
$states = Zend_Registry::get('db')->fetchAll('SELECT state_id AS id, name_en AS
name FROM core_states WHERE country_id = ?', $this->_getParam('countryId'));
echo Zend_Json::encode($states);
If the name_en field has an umlaut (from a german state), the encoding will
return null. So
[{"id":"124","name":null},{"id":"125",...]
is an example (with only the first element), but when I var_dump the encoded
var, I get
array(16) {
[0]=>
array(2) {
["id"]=>
string(3) "124"
["name"]=>
string(17) "Baden-Württemberg"
}
...
I see the last version (1.7.8). Did you encounter the same problem?
Thank you