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 -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -

java - How to implement an entity bound odata action in olingo v4.3 -