How can i Retrieve Image from Json in Php -


how can retrieve image json image stored in folder. name output name working did not show image. php

<?php   $json_file = file_get_contents('file.json');  $array = json_decode($json_file, true);         foreach ($array $key => $value) {       echo $value['name'];      echo $value['image'];      }  ?>  

json

[{      "name": "anyname"     "image": "img/bk.png"  }] 

try:

echo '<img src="' . $value['image'] . '" height="100%" width="100%">' 

Comments

Popular posts from this blog

'hasOwnProperty' in javascript -

c# - Update a combobox from a presenter (MVP) -

android - Unable to generate FCM token from dynamically instantiated Firebase -