Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6984425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:32:51+00:00 2026-05-27T18:32:51+00:00

<?php $str= <<<HTML <div class=spoiler><span class=trigger><img src=/images/tree/plus.gif /><a href=#>Filejungle</a></span> <div style=display: none>Content </div> </div><br/>

  • 0
<?php
$str= <<<HTML
<div class="spoiler"><span class="trigger"><img src="/images/tree/plus.gif" /><a href="#">Filejungle</a></span>
    <div style="display: none">Content
</div>
</div><br/>
<br/>
HTML;

$str = preg_replace("#<span class=\"trigger\"\>\<img src=\"/images/tree/plus.gif\" /><a href=\"#\">(.*)\</a\>\</span\>#s", "", $str);
echo $str;
?>

Warning: preg_replace() [function.preg-replace]: Unknown modifier….

How have I to correct?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:32:52+00:00Added an answer on May 27, 2026 at 6:32 pm

    Your delimiter is # but you’re using it in your <a href as well. Escape it.

    $str = preg_replace("#<span class=\"trigger\"\>\<img src=\"/images/tree/plus.gif\" /><a href=\"\#\">(.*)\</a\>\</span\>#s", "", $str);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

<?php require_once(simple_html_dom.php); $str = '<div class=content><span>text1</span><span>text2</span><span>text3</span><span>text4</span><span>text5</span><span>text6</span><span>text7</span><span>text8</span><span>text9</span><span>text10</span><span>text11</span><span>text12</span><span>text13</span><span>text14</span><span>text15</span><span>text16</span></div>'; $dom = html_entity_decode($str); $html = str_get_html($dom); foreach($html->find('span') as
please see this html codes : <!-- PAGE - 5 --> <div class=section cc_content_5
I'm trying to select either a class or an id using PHP Simple HTML
I want to use the PHP Simple HTML DOM Parser to display all my
I am using php's DOMDocument->getElementById->nodeValue to set a particular DOM element's HTML. The problem
hi i got the problem the script.js gives me <div id=gracze> <div id=10 class=char
I'm hoping someone can help me. I'm using PHP Simple HTML DOM Parser (http://simplehtmldom.sourceforge.net/manual.htm)
I want to give a text to a DIV. This text has HTML tags,
I am loading a .php file into a div I created. I can successfully
I've got a .php page showing a HTML table similar to this one :-

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.