I want to create a unique id but uniqid() is giving something like \'492607b0ee414\'. What i would like is something similar to what tinyurl gives:
uniqid()
\'492607b0ee414\'
You can achieve that with less code:
function gen_uid($l=10){ return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyz"), 0, $l); }
Result (examples):