PREG and EREG do not use the same syntax. There are some simple patterns that work with both, but you can't simply change the name of the function and expect it to always work properly.
Originally Posted by Dan13071992
Limiting the characters in your random password generator isn't necessary since anyone on a desktop/laptop/smartphone is going to be able to copy/paste it and likely change it to something they can remember anyway.
Originally Posted by jmj001
Try something like this:
Originally Posted by mitsucats
I separated the img tag's attributes on to different lines to make it clearer.
$chaine_smileys .= '<img src="' . $chem_absolu . 'images/smileys/' . $alex_livre_smileys_smiley[$i] . '" ' .
'alt="" ' .
'title="' . ucfirst(str_replace('_', ' ', preg_replace('/\..*$/s', '', $alex_livre_smileys_smiley[$i]))) . '" ' .
Edit: here is what that regular expression does(removes the file extension):
Match the character “.” literally «\.»
Match any single character «.*»
`- Between zero and unlimited times, as many times as possible, giving back as needed (greedy) «*»
Assert position at the end of the string (or before the line break at the end of the string, if any) «$»