silentwf Posted August 5, 2006 Share Posted August 5, 2006 I'm trying to make a highlight replacing function just like GeSHi (but I need to mod it for my needs and stuff)My code is:[code]<?php$string = include("test.php");$r = "<a href='whoknowswhat.html'>apples</a>";$p = "apples";$s2 = eregi_replace($p, $r, $string);echo $s2;?>[/code]i THINK that my $s2 declaration has no problems and I think the problem resides in $string. Is my declaration incorrect, 'cause once I change $string into something like "I love to eat apples" or something, the eregi_replace function works like magic. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.