Flyman30 | une simple fonction fait ça, c'est pour l'ASP donc à adapter si c'est du PHP :
Code :
- <%
- function remplace(txt)
- Dim temp
- temp = replace(temp,VbCrLf,"<br />" )
- temp = Replace(temp, "", "<b>" )
- temp = Replace(temp, "", "</b>" )
- temp = Replace(temp, "", "<i>" )
- temp = Replace(temp, "", "</i>" )
- temp = Replace(temp, "", "<u>" )
- temp = Replace(temp, "", "</u>" )
- temp = Replace(temp, "[ul]", "<ul>" )
- temp = Replace(temp, "[/ul]", "</ul>" )
- temp = Replace(temp, "[x]", "<li>" )
- temp = Replace(temp, "[/x]", "</li>" )
- temp = Replace(temp, "[cadre]", "<div class='cadre'>" )
- temp = Replace(temp, "[/cadre]", "</div>" )
- remplace = temp
- end function
- %>
|
|