Forum Moderators: coopster

Message Too Old, No Replies

Append "string" to uniqe ID?

Anyone know how to do this?

         

Bingo

11:36 am on Jun 10, 2004 (gmt 0)

10+ Year Member



Hi, I'm using a this to generate a unique ID:

$id = (substr(uniqid (""), 2, 7));

example output >> c846dd1

I'd like to append "abc" to beginning of the id.

eg. abcc84dd1

Any ideas? I'd appreciate it!

Bingo

pete_m

12:10 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



$id = "abc" . (substr(uniqid (""), 2, 7));

Bingo

12:38 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



Erm thanks Pete, that was a bit easy...

Taxi for me! :)

pete_m

12:49 pm on Jun 10, 2004 (gmt 0)

10+ Year Member



No worries :)

dcrombie

1:34 pm on Jun 10, 2004 (gmt 0)



$id = uniqid("abc");