Method: str::parse

Parses a string by a set of available methods

Available methods:
- json
- xml
- url
- query
- php

Info

Syntax

str::parse($string, $mode='json')

Parameters

Return (string)

Example


str::parse('{"test":"cool","super":"genious"}');
// output: array(
//  'test' => 'cool',
//  'super' => 'genious'
// );

str::parse('<xml><entries><cool>nice</cool></entries></xml>', 'xml');
// output: array(
//    'entries' => array(
//        'cool' => 'nice'
//    )
// );