[shell]$ nano converter.sh

#/bin/bash
LIST=`ls *.php`
for i in $LIST;
do iconv -f UTF8 -t WINDOWS-1251 $i -o $i."windows-1251";
mv $i."windows-1251" $i;
done

[shell]$ chmod +x converter.sh
[shell]$ ./converter.sh