As I remember from php tutorials If search and replace are arrays, then str_replace() takes a value from each array and uses them to do search and replace on subject. If replace has fewer values than search, then an empty string is used for the rest of replacement values. If search is an array and replace is a string, then this replacement string is used for every value of search. The converse would not make sense, though.

I only know from http://phpforms.net/tutorial/tutorial.html that when a Wordpress plugin becomes active, it might be interesting to do some processing (such as database creation, options filling, and so on…). To do so, Wordpress is providing a very usefull function that will enable you to call your own initialisation function. It’s called register_activation_hook($file,$function);

This function takes these two parameters:

•$file : the file where is located the function to call
•$function: the name of the function to call
So you will only need to declare previous line with corresponding parameters and, of course, to have your function ready. Anything present inside this function will be executed by Wordpress engine at plugin activation time, and only at this moment. Of course, counterpart function exists, and is called register_deactivation_hook($file, $function);.

When calling register_activation_hook, you can use the __FILE__ constant value which describes current file.