[ create a new paste ] login | about

Link: http://codepad.org/CQm4otEX    [ raw code | output | fork ]

PHP, pasted on Aug 18:
1
2
3
4
5
6
7
8
9
10
11
<?php

$post = array();
$post['array1'] = array('info1', 'info2', 'info3');
$post['info4'] = '#';

echo serialize($post);
echo "\n";
echo json_encode($post);

?>


Output:
1
2
a:2:{s:6:"array1";a:3:{i:0;s:5:"info1";i:1;s:5:"info2";i:2;s:5:"info3";}s:5:"info4";s:1:"#";}
{"array1":["info1","info2","info3"],"info4":"#"}


Create a new paste based on this one


Comments: