Hi, I have this code in php to visualize the values of the array but I get an error of Array to string conversion and I do not know why.
Code:
<?php
echo "<h3>Diferentes formas de array</h3>";
echo "Funcion array()";
$colores = array(
0=>'azul',
1=>'rojo',
2=>'verde');
echo "Resultado de la funcion es: ".$colores;
$colores2 = array("azul","rojo","verde");
echo "Valor del array: ".$colores2;
?>