Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Weird stripslashes() error.

SpaceshipSpaceship
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

user-7256

VIP Member
Impact
111
Hi,

Strange stripslashes() problem.

I'm using GeSHi to highlight this code... but when I run a stripslashes() on it, it goes wierd like this:

http://www.gotutorials.com/view/?id=1

Any idea why this is?

Oh, my code:

PHP:
while (strpos($tutorial, ":code.", $i + 1) > 0)
  {
    $i = strpos($tutorial, ":code.", $i) + 6;
    $ii = strpos($tutorial, ":", $i); + 1;

    $idnum = substr($tutorial, $i, $ii - $i);
    $codetmp = show_code($idnum);

    //below is the line with stripslashes.
    $tutorial = stripslashes(substr_replace($tutorial, $codetmp, ($i - 6), ($ii + 1) - ($i - 6)));
  }
  echo($tutorial);

Notice the stripslashes() on the commented line. It changes the quotes into a different style of some sort and it highlights improperly. How can I fix this?

Thanks,
-Matt
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
CatchedCatched

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Each character of a domain name in its own box, with how to type one of them
Bookmarks: see bookmarks without a label
You can now show only the bookmarks you have not labeled. Open the label filter in the Bookmarks tab of your account menu, or on your...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back