0
<?php
if(isset($_GET['acao'])){?>
<?php $acao = $_GET['acao'];
switch ($acao) {
case 'buscar':
$dados = array(
array(
"video" => 'LWzwjcgh7_A',
"imagem" => 'https://i.ytimg.com/vi/LWzwjcgh7_A/mqdefault.jpg',
"titulo" => 'Amado Batista Princesa',
"subtitulo" => 'Dados do video',
),
);
break;
default:
# code...
break;
}
echo(json_encode($dados));
}
?>
I wanted to separate this part I’ll make a loop here I’ll duplicate
array(
"video" => 'LWzwjcgh7_A',
"imagem" => 'https://i.ytimg.com/vi/LWzwjcgh7_A/mqdefault.jpg',
"titulo" => 'Amado Batista Princesa',
"subtitulo" => 'Dados do video',
),
Actually this is json but I’m not seeing the array when I put echo
– Hemerson Prestes
Could you improve the wording of the question? I found it vague and confusing.
– José Diz