This is my PHP code
<?php
// Load Azure Drivers
require_once '../vendor/autoload.php';
use WindowsAzure\Common\ServicesBuilder;
use MicrosoftAzure\Storage\Common\ServiceException;
use MicrosoftAzure\Storage\Table\Models\QueryEntitiesOptions;
// Connection String
$connectionString = 'DefaultEndpointsProtocol=https;AccountName=<account_name>;AccountKey=<account_key>==';
// Create table REST proxy.
$tableRestProxy = ServicesBuilder::getInstance()->createTableService($connectionString);
$user_input = "Username eq '<user>'";
try {
$result = $tableRestProxy->queryEntities("<table>", $user_input);
}
catch(ServiceException $e){
echo "<h1>Error querying, please contact Admin.</h1>";
die();
}
$entities = $result->getEntities();
foreach($entities as $entity){
echo $entity;
}
?>
I have censored out all the connection and table information. But everything works when I use the demo code. But I want to retrieve the full row. When I execute this I get this error
Catchable fatal error: Object of class MicrosoftAzure\Storage\Table\Models\Entity could not be converted to string
Any ideas?