i want to get the user avatar URL to use it as background URL style for a div. i tried to use the following but it does not return anything when i view the code it appears like that.
background: url()
i used this function.
function get_avatar_url($get_avatar){
preg_match("/src="https://wordpress.stackexchange.com/questions/63198/(.*?)"/i", $get_avatar, $matches);
return $matches[1];
}
any help please??