Za pomocą skryptu php generuję taką oto tablicę:
Array
(
[0] => Array
(
[slotId] => 5
[ruleId] => 42
[slogan] => Ta oferta
[refererType] => 0
[items] => Array
(
[0] => Array
(
[itemId] => 456677
[photoLink] => http://localhost/zdjecia/456677
)
[1] => Array
(
[itemId] => eegfr453
[photoLink] => http://localhost/zdjecia/eegfr453
)
[2] => Array
(
[itemId] => 168064
[photoLink] => http://localhost/zdjecia/05102008591
)
[3] => Array
(
[itemId] => 22092008536
[photoLink] => http://localhost/zdjecia/22092008536
)
[4] => Array
(
[itemId] => 18092008512
[photoLink] => http://localhost/zdjecia/18092008512
)
[5] => Array
(
[itemId] => 168064
[photoLink] => http://localhost/zdjecia/05102008590
)
[6] => Array
(
[itemId] => 22092008535
[photoLink] => http://localhost/zdjecia/22092008535
)
[7] => Array
(
[itemId] => 168064
[photoLink] => http://localhost/zdjecia/05102008589
)
[8] => Array
(
[itemId] => 777
[photoLink] => http://localhost/zdjecia/777
)
[9] => Array
(
[itemId] => 22092008538
[photoLink] => http://localhost/zdjecia/22092008538
)
)
)
)
następnie chciałbym to przekonwertować do json za pomocą funkcji json_encode($tablica), ale XmlHttpRequest w firebug zwraca mi zwykły html.