Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,885 questions

51,811 answers

573 users

How to generate a short unique ID in PHP

2 Answers

0 votes
$short_unique_id = uniqid();

echo $short_unique_id;





/*
run:

656aedef934c0

*/

 



answered Dec 2, 2023 by avibootz
0 votes
$prefix = 'vq_';

$short_unique_id = $prefix.uniqid();

echo $short_unique_id;





/*
run:

vq_656aeeb10ed33

*/

 



answered Dec 2, 2023 by avibootz

Related questions

1 answer 130 views
130 views asked Oct 2, 2021 by avibootz
1 answer 91 views
91 views asked Sep 23, 2023 by avibootz
2 answers 98 views
1 answer 117 views
117 views asked Mar 23, 2024 by avibootz
1 answer 112 views
...