I have an array in my mysql database and I would like to show the values of the array on screen. The array is inside orden and I am trying to use function mysql_one_array($query). I don´t know If I am using the correct function or I should use another. Right now I am not able to see the values of the array. Thanks for your help.
<?php
$sql = 'select orden from pedido where id_pedido = "' . $ID . '"';
function mysql_one_array($sql) {
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
return ($result);
}
?>
You have to call the function with
mysql_one_array( $sql ). As your code is, the function is only defined.