auto link word link in content

If I understand correctly … first of all you need to match everything inside paragraphs using regex.

$content = "<p>some text which includes test1 and test2 etc</p>";
preg_match_all("/<\s*p[^>]*>([^<]*)<\s*\/\s*p\s*>/", $content);

then you can use your code.

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