look, this is the problem:
i made a directory called "/images/smileys/", in here are 131 different files (.gif and .png). i want to give people the possibility to add these smilies in their comments, but i think its a waste of time to create this line for every smile :
$comment = eregi_replace("🙂","<img src=\"images/smileys/smile.png\" border=\"0\">",$comment);
actually i was thinking about a piece of code that gets the filenames out of the smilie directory and puts them in a table, so the people can see what they should write to get the smiley, like this :
smiley : code :
<image> [smile.png]
<image> [laugh.png]
<image> [bonk.gif]
and then when somebody puts [smile.png] in their textbox and posts their message, the code automaticly converts this "tag" into <img src=\"/images/smileys/smile.png\" border=\"0\"> for the output to the browser.
is this possible?
many thanks for your reactions