I have some texts that are always begin with an image tag , so i want to print the text without the image by specifying the start and the end characters of the string that should be removed and get the rest of the text, something like:
explode($text, '<img', '/>'); // where explode($string, $start_chars, $end_chars);
for example:
$text = "<img src='anything' width='100' height='200'/><h1>Hello World!</h1>";
the output should be <h1>Hello World!</h1>
so how I can do that in php?
` must be removed too?
– Federkun May 21 '15 at 23:25