I'm learning PHP and somehow when I try to fetch data from database this is the query:
select ItemId, ItemName, ItemPrice, ItemPicture
from Webshop_Items
where ItemId = 12
This is the SSMS data:
ItemId ItemName ItemPrice ItemPicture
12 Cool Item 11 DFEAEC2D-9AE8-4329-8942-C20381C7795F.png
This is the array that I'm receiving back and I cannot use it like this
$result = ....
echo '<a>$result['ItemName'];</a>'
When I added logs to print the data its look like this:
a:1:{i:0;a:4:{s:6:"ItemId";i:7;s:12:"ItemName";s:9:"Cool Item";s:9:"ItemPrice";i:10;s:11:"ItemPicture";s:40:"DFEAEC2D-9AE8-4329-8942-C20381C7795F.png";}}
Thanks in advance.