[ create a new paste ] login | about

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

PHP, pasted on Oct 1:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

function taken_value($value, $table, $row, $desc) {
    $response = array(
        'ok' => false,
        'msg' => $desc." is already taken."
    );  

    echo json_encode($response); 
}

taken_value('','','','test');

?>


Output:
1
{"ok":false,"msg":"test is already taken."}


Create a new paste based on this one


Comments: