Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function makeLinks( &$arr ) {
- foreach( $arr as $key=>$value ) {
- if( isset( $value[ 'description' ] ) ) {
- $pattern = '/(https?\S+)(\s*)/';
- $replacement = '<a href="$1">$1</a>$2';
- $value['description'] = preg_replace( $pattern, $replacement, $value['description'] );
- print_r2( $value['description'] );
- }
- }
- print_r2( $arr );
- }
Add Comment
Please, Sign In to add comment