parse_smileys()

parse_smileys([$str = ''[, $image_url = ''[, $smileys = NULL]]])

Parameters:
  • $str (string) – Text containing smiley codes
  • $image_url (string) – URL path to the smileys directory
  • $smileys (array) – An array of smileys
Returns:

Parsed smileys

Return type:

string

Takes a string of text as input and replaces any contained plain text smileys into the image equivalent. The first parameter must contain your string, the second must contain the URL to your smiley folder

Example:

$str = 'Here are some smileys: :-)  ;-)';
$str = parse_smileys($str, 'http://example.com/images/smileys/');
echo $str;
doc_CodeIgniter
2016-10-15 16:32:32
Comments
Leave a Comment

Please login to continue.