I hope I'm right here.
I am making a search engine and take my Data from a json-file(url) I can read out the text with my code (php)
<?php
foreach ($obj['Products'] as $key => $value) {
echo '<p>Artikel: '.$value['ProductName']. '</p> <br/>';
echo '<p> Produktbeschreibung: '.$value['Description'].'</p> <br/><br/>';
echo '<a href="' .$value['Deeplink1'].'" target="_blank"> zum Shop </a><br/><br/>';
}
$service = "http://dateck-media.de/sf/ddd.php ;This is the JSON // Put together request $request = $service . "?" . http_build_query($params); Get response $response = file_get_contents($request,TRUE); $obj = json_decode($response,true);
but now i want to show the results of my search. in my json file it looks like
Array (
[ProductsSummary] => Array (
[Records] => 20
[TotalRecords] => 41
[TotalPages] => 3
[CurrentPage] => 1
)
[Products]
I don't know how to get the [Totalrecords] in my code to ECHO "You have [TotalRecords] for your search"
Please help me.