Jump to content

clear html tags and after the tags

- - - - -

  • Please log in to reply
1 reply to this topic

#1
lol33d

lol33d

    Programmer

  • Members
  • PipPipPipPip
  • 149 posts
hi guys

i have 2 string:

<?php

$str1 = "my text<br/><span>beta<span>";


$str2 = "my text2<br/>alpha";


$str3 = "my text3"


i want get only before tag,

output:
str1: my text
str2: my text2
str3: my text3

help please

thank you

#2
grisha

grisha

    Learning Programmer

  • Members
  • PipPipPip
  • 35 posts
RTM, mate ;)
That's the solution you're looking for: strip_tags()




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users