Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
//配列を作成します
$arr = array('html','css','php','mysql');
//Formatクラスとto_jsonメソッドで、配列をjsonに変換します
$json = Format::forge($arr)->to_json();
print_r($json);
//出力結果
["html","css","php","mysql"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment