Viewing 3 replies - 1 through 3 (of 3 total)
  • The problem is the < characters for some reason.
    In my example this doesn’t work and gives an error

    $start = strpos($homepage, "<div");
    $stop = strpos($homepage, "</div>") + 6;

    But this works fine.

    $start = strpos($homepage, "div ") - 1;
    $stop = strpos($homepage, "/div") + 5;

    Problem solved you think … nope. Then there is an error on this code:
    $homepage = substr($homepage, $start, $stop - $start);

    Not sure what the problem is.

    Looks like the plugin doesn’t handle all strings … I think.
    Anyone?

    Well, don’t look any further.
    Using the plugin Insert PHP, my problem is solved. Joehoe!!

    OK, the Insert PHP plugin has also not been updated for some time now, but the support forum is still alive and kicking.

    Thread Starter samsports

    (@samsports)

    Same for me. I switched to “Insert PHP” some hours after I wrote this thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Function str_replace to brackets did not what it should’ is closed to new replies.