I send this array to php and when I want to show the results the following error appears:
"Illegal string offset 'nombre_color'"
This is the array result made with print_r() in the same php before the error:
Array(
[0] => Array
(
[med_id] => 1
[codigo] => 1111111111
[medida] => XL
[nombre_color] => Negro
[color] => #000000
[precio] => 1111
[anterior] => 1000
[stock] => 100
[disponible] => 1
)
)
And this is the part of code that gives me error:
foreach($medidas as $medida){
$med_id = $medida['med_id'];
$codigo = $medida['codigo'];
$medida = $medida['medida'];
$nombre_color = $medida['nombre_color'];
$color = $medida['color'];
$precio = $medida['precio'];
$anterior = $medida['anterior'];
$stock = $medida['stock'];
$disponible = $medida['disponible'];
}
Thanks in advance for your help.