json encode using php - Json

json encode

Snippet Code


  
Rate this page :
  [ 0 votes]

The array values can be converted into json file using php json_encode function.

<?php $arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5); echo json_encode($arr); ?> Output: {"a":1,"b":2,"c":3,"d":4,"e":5}

Tags


Ask Questions

Ask Question