I want to create Unique ID for my site users in this format
pubID-john_34032
So I want to do this using the email string.
I have this pseudo code (but I want it faster and more logical if that makes sense)
How do I write my Pseudo code as PHP?
<?php
$var e(mysqlescape(get(emailform));
$var r(rand(3,34);
$var ex=(pubID-);
$var e=(replace(@/.); //users may enter 1@site.com so replace the at and .
$var e(first4strTo(e)); // get first four letters, example 1sit
$var e(e)+r(); // e is now 1site-1547
$var printStr e+ex //join the 1site-1547 with pubID- and done
?>