[ create a new paste ] login | about

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

PHP, pasted on Nov 24:
1
2
3
4
5
6
7
8
9
10
11
12
<?
$_POST['tags'] = 'test';

$tags = (isset($_POST['tags']) && is_array($_POST['tags'])) ? implode(", ", $_POST['tags']) : null;

echo "tags = ".$tags."\n";

$_POST['tags'] = array('test', 'if', 'it', 'is', 'good');

$tags = (isset($_POST['tags']) && is_array($_POST['tags'])) ? implode(", ", $_POST['tags']) : null;

echo 'tags = '.$tags;


Output:
1
2
tags = 
tags = test, if, it, is, good


Create a new paste based on this one


Comments: