Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Milad miladganjali

🎯
Focusing
View GitHub Profile
@miladganjali
miladganjali / linkify.php
Created Oct 11, 2019 — forked from jasny/linkify.php
PHP function to turn all URLs in clickable links
View linkify.php
<?php
/**
* Turn all URLs in clickable links.
*
* @param string $value
* @param array $protocols http/https, ftp, mail, twitter
* @param array $attributes
* @return string
*/
public function linkify($value, $protocols = array('http', 'mail'), array $attributes = array())