preg_replace() No ending delimiter ‘.’ found [closed]

http://php.net/manual/en/function.preg-replace.php

preg_replace expects your first parameter to be a pattern.

Try a simple replace:

$item = str_replace( array('.',' '), array('-','-'), strtolower($item));

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)