I'm having a bit of an issue with what is normally a simple foreach loop through a query array. I am trying to target individual field values from a row, but its only returning the first letter of each. New to OCI so any help would be appreciated.
$custcart = oci_parse($conn,"SELECT * FROM A113222813_CARTLINE WHERE CUST_ID=
:cust_id");
oci_bind_by_name($custcart, ":cust_id", $_SESSION["CUST_ID"]);
if (!$custcart) {
echo "There was an error. Please wait wwhile we redirect you.";
$url ="login.php";
$time_out = 5;
header("refresh: $time_out; url=$url");
}
oci_execute($custcart);
include 'includes/header.php';
while ($row = oci_fetch_array($custcart, OCI_ASSOC)) {
foreach ($row as $item) {
echo $item['CART_NAME'];
}
}