Function for creating unique strings for urls
Algorithm


  
  Every call must generate a unique string of alpha numeric characters.
  Most important: Zero chance of string duplication.
  


"zero chance" is really hard to achieve, if it's even possible.
Your algorithm is essentially based on the current time in microseconds.
Since systems may adjust their clock, for example with NTP,
the same microsecond may happen again,
resulting in a non-unique string.

Striving for a unique random string is known challenge,
see for example the uniqid function.
The documentation offers some recommendations for cryptographic security,
and I think it might be a good idea to incorporate uniqid into your algorithm.


  
  Repeat calls should reflect a high degree of dissimilarity.
  


If I call the function twice in a row I get values with a similar prefix, for example:


qf1p1dojax7n7m08no1f
qf1p1drbj0nbnahjqg1f

gp70pxdfghnbnaetckpa
gp70pxg8j0q4q3hlfcpa



This is because in the microseconds parts are too similar in consecutive calls.
You seem to be using the microseconds part as a 6-digit random number.
You would get better results with a proper pseudo random generator,
for example one of the recommendations from uniqid.

Readability

The implemented algorithm is quite straightforward:


Prepare 3 strings of at least 10-digits:


a 12-digit string from the first 6 decimal digits of the microseconds elapsed since the current timestamp seconds, concatenated with its reverse
a 10-digit string from the current timestamp
a 10-digit string from the reverse of the current timestamp

Count from 0 until 9 to generate a 20-letter string:


Create a 3-digit number using i-th positions from the prepared strings
Encode the 3-digit number as a base-36 number, so that it becomes a 2-letter string
Concatenate the 2-letter encoded strings to get a 20-letter string



Unfortunately this flow of logic is not easy to see in the implementation,
because the variable names are not helping.


Instead of the array $time_array,
it would be better to use 3 variables with descriptive names.
If you extract the big logical steps to functions, for example one to generate a 3-digit number, and another to encode a 3-digit number in base-36, the code could read almost like a story.


Technique

Instead of $mod = $num - ($mult * 36) you could simply use the modulo operator: $mod = $num % 36.

Instead of hard-coding 36, which has to be the length of $letters,
it would be better to store it in a variable, and derive its value from the length of $letters.
So that if one day you change the alphabet (for example add capital letters too),
then you won't have to remember to replace all the 36 with the new value,
the program will "just work".

Instead of implementing base-36 encoding yourself,
you could use the existing base_convert function.
It's not 100% the same, because it uses slightly different alphabet,
and you would need to convert the number parameter to string.