hello guys, i had weird problem with code like that (zf 0.7.0):

foreach ($this->_subSites->fetchAll() as $subSite)
{
    $resRow = new
StdClass;

    $resRow->id         =
$subSite->id;
    $resRow->subDomain  =
$subSite->subDomain;
    $resRow->image      =
$subSite->image;
    $res[] =
$resRow;

}

echo Zend_Json::encode($res);

on my home machine with php 5.2.0 return:

[{"id":"19","subDomain":"one","image":"\/images\/sub\/image1.jpg"},{"id":"13","subDomain":"test","image":"\/images\/sub\/ee.jpg"},{"id":"1","subDomain":"two","image":"\/images\/sub\/test.jpg"}]

on the server with php 5.1.4:
[{"__className":"stdClass","id":"19","subDomain":"one","image":"/images/sub/image1.jpg"},{"__className":"stdClass","id":"13","subDomain":"test","image":"/images/sub/ee.jpg"},{"__className":"stdClass","id":"1","subDomain":"two","image":"/images/sub/test.jpg"}]

not same...


any ideas?

--
Thanks, Dmitry

Reply via email to