Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've done things like this using variations of substring and replace. <strike>I'd probably use regex today</strike> but you wanted an alternative so: </p> <p>For the <code>&lt;i&gt;</code> tags, I'd do something like:</p> <pre><code>$text = replace($text, "&lt;i&gt;", ""); $text = replace($text, "&lt;/i&gt;", ""); </code></pre> <p>(My php is really rusty, so <code>replace</code> may not be the right function name -- but the idea is what I'm sharing.)</p> <p>The <code>&lt;a&gt;</code> tag is a bit more tricky. But, it can be done. You need to find the point that <code>&lt;a</code> starts and that the <code>&gt;</code> ends with. Then you extract the entire length and replace the closing <code>&lt;/a&gt;</code></p> <p>That might go <em>something</em> like:</p> <pre><code>$start = strrpos( $text, "&lt;a" ); $end = strrpos( $text, "&lt;/a&gt;", $start ); $text = substr( $text, $start, $end ); $text = replace($text, "&lt;/a&gt;", ""); </code></pre> <p>(I don't know if this will work, again the idea is what I want to communicate. I hope the code fragments help but they probably don't work "out of the box". There are also a lot of possible bugs in the code snippets depending on your exact implementation and environment) </p> <p>Reference:</p> <ul> <li>strrpos - <a href="http://www.php.net/manual/en/function.strrpos.php" rel="nofollow noreferrer">http://www.php.net/manual/en/function.strrpos.php</a></li> <li>replace - <a href="http://www.php.net/manual/en/function.str-replace.php" rel="nofollow noreferrer">http://www.php.net/manual/en/function.str-replace.php</a></li> <li>substr - <a href="http://php.net/manual/en/function.substr.php" rel="nofollow noreferrer">http://php.net/manual/en/function.substr.php</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload