1
I’m having trouble formulating a chart.
I have basically 2 fields: categorias
and dados
. Within categorias
, the information must be so: ['categoria 1', 'categoria 2', 'etc']
in quotes and separated by comma. Already inside data, the information needs to come like this: [dado 1, dado 2, dado 3]
quote-free.
I need to get both information (categorias
and dados
) of a select in a Postgresql database, but only succeed in the field dados
, since it never comes separated with quotes. How can I format to include quotes?
This is an example of code for data:
$query="SELECT colunaa from minha tabela";
$output=pg_query($conn,$query);
?>
[<?php while ($result = pg_fetch_array($output)) {?>
<?php echo $result["colunaa"]?>,
<?php } ?>]
Ever tried to make
'<?= $result['colunaa'] ?>',
– Marcelo Shiniti Uchimura