jsonEncode

Navigation:  Development > Function Reference > Module > Cryptography >

jsonEncode

Previous pageReturn to chapter overviewNext page

Convect an array in JSON format
 

App::Module('Cryptography')->jsonEncode(data);
 

 

Parameter

Type

Description

data

Mandatory

Array to convert in JSON

 

See bellow examples:

 

$data = array('status'=>'Success','message'=>'Update successfully');
echo App::Module('Cryptography')->jsonEncode($data);
 
/* 
Return
{"status":"Success","message":"Update successfully"} 
*/