I want to make a database primary key. I am using PHP uniqid() Function.
$id = "php"."date('Y')".$i;
String concatenation operator in php is '.', so to get your extra '-' characters add them to you string, Check the below code. You should insert your unique id in database as "php-16-001". Make sure your $i variable is a string.
$id = "php-" . date('y-') . $i;