Created
January 29, 2015 10:58
-
-
Save CTimmerman/4959e97a8b102f1e8d4e to your computer and use it in GitHub Desktop.
PHP linking snippet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
substr(preg_replace_callback('/(.*?), /', function($matches){ | |
return '<a href="user_mod.php?frole='.rawurlencode($matches[1]).'">'.$matches[1].'</a>, '; | |
}, $row['froles'].', '), 0, -2) |
In this case the CSV have already been HTML escaped.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This turns CSV into linked CSV.