Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $string = 'I wish you a merry <span style="font-size: 14px;">Christmas</span> and a happy new <span style="font-size: 18px;">year</span>!'
- $arr[0] = 'I wish you a merry '
- $arr[1] = '<span style="font-size: 14px;">Christmas</span>'
- $arr[2] = ' and a happy new '
- $arr[3] = '<span style="font-size: 18px;">year</span>'
- $arr[4] = '!'
- $arr = explode('<span style="font-size: ', $string);
- preg_match_all('~<span style="font-size:' . $fontSize . 'px;">(.*?)</span>~', $string, $output[$fontSize]);
Add Comment
Please, Sign In to add comment