- json_encode: documentation ( source)
<?php
echo json_encode(
array (
0 =>
array (
'id' => '301',
'video_id' => '1',
'gallery_id' => '0',
'type' => 'thumbnail_small',
'url' => 'http://thumbnail.small.1',
),
1 =>
array (
'id' => '302',
'video_id' => '1',
'gallery_id' => '0',
'type' => 'thumbnail_large',
'url' => 'http://thumbnail.large.1',
),
)
);