freak Posted October 3, 2005 Report Share Posted October 3, 2005 (edited) Kads nepateix kaa, lai texta mekle e-pastus un partaisa tos uz html formatu. Piemeram: $txt="dasdasd sad vards@mail.lv sdadasd sad a xxxx@xxxx.com"; Jaiegust $txt="dasdasd sad <a href='mailto:vards@mail.lv'>vards@mail.lv</a> sdadasd sad a <a href='mailto:vxxxx@xxxx.com'>xxxx@xxxx.com</a>"; Paldies! Edited October 3, 2005 by freak Link to comment Share on other sites More sharing options...
Delfins Posted October 3, 2005 Report Share Posted October 3, 2005 $text = preg_replace( $emailPattern, '<a href="\1">\1</a>', $text ); $emailPattern var sameklēt gūūglē dafiga. Katram sava realizācija. pašam tagad slinkums rakstīt, jo zinu, ka pilns webs ar to :) Link to comment Share on other sites More sharing options...
freak Posted October 3, 2005 Author Report Share Posted October 3, 2005 neko jedzigu neatradu... Link to comment Share on other sites More sharing options...
bubu Posted October 3, 2005 Report Share Posted October 3, 2005 Nu gan tu dod... http://www.google.com/search?q=php+e-mail+...ression+pattern Link to comment Share on other sites More sharing options...
freak Posted October 3, 2005 Author Report Share Posted October 3, 2005 $txt=preg_replace('/(\s|^)(\[email\]|)([_\.0-9a-z-]+?@[_\.0-9a-z-]+?)(\[\/email\]|)(\s|$)/im', '$1<a href="mailto:$3">$3</a>$5', $txt) ; vairs nevjg ;) Priekshtam jau tie forumi domati! Link to comment Share on other sites More sharing options...
Delfins Posted October 3, 2005 Report Share Posted October 3, 2005 tas nav tas, ko tev vajag, ja skatās teksta piemēru tavā pirmā postā. iemācies uzdot jautājumus. Link to comment Share on other sites More sharing options...
Recommended Posts