Chatrapati Posted August 16, 2013 Share Posted August 16, 2013 How to add similey to php page, eg: if we add - it should show similiey[image] Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/ Share on other sites More sharing options...
Chatrapati Posted August 16, 2013 Author Share Posted August 16, 2013 if we add .smile. it should be converted into image lyyk this >> Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/#findComment-1445320 Share on other sites More sharing options...
Ron916 Posted August 16, 2013 Share Posted August 16, 2013 How about this? str_replace('.smile.', '<img src="/path/to/smiley.jpg" alt=":)">', $html); Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/#findComment-1445323 Share on other sites More sharing options...
Chatrapati Posted August 16, 2013 Author Share Posted August 16, 2013 Why did yu write $html there? Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/#findComment-1445340 Share on other sites More sharing options...
kicken Posted August 16, 2013 Share Posted August 16, 2013 Because you have to have string variable with your content, which has been represented as $html in the example. Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/#findComment-1445409 Share on other sites More sharing options...
Chatrapati Posted August 17, 2013 Author Share Posted August 17, 2013 How to use,it. gv an example please Link to comment https://forums.phpfreaks.com/topic/281239-how-to-add-simileys-to-php-page/#findComment-1445459 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.