I want to get html tag in string at starting position and remove it from the string
my demo strings are below:
<I>little willingness</I> that, as the Course itself was to emphasise
this will return <I>
tag as o/p
<p>little willingness</p> that, as the Course itself was to emphasise
this will return <p>
tag as o/p
little willingness that, <p>as the Course itself was to emphasise</p>
this will return me null as o/p
How do I modify my code below to check only for HTML tags at the start of the line and then remove them?
preg_match("/<[^<]+>/",$string,$m);