![]() |
Strip tags - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Strip tags (/showthread.php?tid=25910) |
Strip tags - El Forum - 12-30-2009 [eluser]basty_dread[/eluser] how to re place all the font size and font family with the one i will specify? so i could have uniform font size and font family.. I hope you could help me.. Thanks in advance.. Strip tags - El Forum - 12-30-2009 [eluser]Craig A Rodway[/eluser] Erm... use CSS? :roll: Strip tags - El Forum - 12-30-2009 [eluser]basty_dread[/eluser] css is not working.. i already tried css.. and its not working.. this is the string that i should replace the formatting: ie font size = 14px font-family = arial [code] <p> <span style="font-size:9px;"><span style="font-family:arial,helvetica,sans-serif;">Arial</span></span></p> <p> <span style="font-size:10px;"><span style="font-family:comic sans ms,cursive;">Comic Sans</span></span></p> <p> <span style="font-size:11px;"><span style="font-family:courier new,courier,monospace;">Courier New</span></span></p> <p> <span style="font-size:12px;"><span style="font-family:georgia,serif;">Georgia</span></span></p> <p> <span style="font-size:14px;"><span style="font-family:lucida sans unicode,lucida grande,sans-serif;">Lucida Sans Unicode</span></span></p><p> <span style="font-size:16px;"><span style="font-family:tahoma,geneva,sans-serif;">Tahoma</span></span></p> <p> <span style="font-size:18px;"><span style="font-family:times new roman,times,serif;">Times New Roman</span></span></p> <p> <span style="font-size:20px;"><span style="font-family:trebuchet ms,helvetica,sans-serif;">Trebuchet MS</span></span></p> <p> <span style="font-size:26px;"><span style="font-family:verdana,geneva,sans-serif;">Verdana</span></span></p> [code] Strip tags - El Forum - 12-30-2009 [eluser]basty_dread[/eluser] and this is the coding that i done.. it is working but its very long code.. where $content is the content above. Code: $setsize = ":15px"; // this is the size that i want to replace Strip tags - El Forum - 12-30-2009 [eluser]Craig A Rodway[/eluser] Code: $size = '15'; Strip tags - El Forum - 12-30-2009 [eluser]basty_dread[/eluser] Code: $replaced = preg_replace('/([0-9]+px)/', $size.'px', $content); what might be wrong Strip tags - El Forum - 12-30-2009 [eluser]basty_dread[/eluser] is there any working code there? pls . help.. thank you.. Strip tags - El Forum - 12-31-2009 [eluser]Craig A Rodway[/eluser] Looks OK to me - output of the code. |