Welcome Guest, Not a member yet? Register   Sign In
highlight searched string
#5

[eluser]cinewbie81[/eluser]
[quote author="walesmd" date="1193224976"]Just do a str_replace to apply a class to the string, then setup your CSS.


[code]
<?php
$str = str_replace($query, '<span class="bold">' . $query . '</span>', $str);
?&gt;[/quote]

I'm looking for the same thing .. thanks again ..
but if I'm not mistaken, str_replace function is only works for php5 right ?? That's bcos i found it on other site, there's different version of code for different version of php .. please see the link below :

http://www.whatstyle.net/articles/6/disp...s_with_php

I'm using php5, please explain if str_replace function will works in php4 or not .. thx


Messages In This Thread
highlight searched string - by El Forum - 10-23-2007, 11:03 PM
highlight searched string - by El Forum - 10-24-2007, 12:22 AM
highlight searched string - by El Forum - 10-24-2007, 12:30 AM
highlight searched string - by El Forum - 10-24-2007, 02:06 AM
highlight searched string - by El Forum - 10-24-2007, 05:04 AM
highlight searched string - by El Forum - 10-24-2007, 06:20 AM
highlight searched string - by El Forum - 10-24-2007, 06:25 AM
highlight searched string - by El Forum - 10-24-2007, 06:28 AM
highlight searched string - by El Forum - 10-24-2007, 06:49 AM
highlight searched string - by El Forum - 10-24-2007, 07:02 AM
highlight searched string - by El Forum - 04-12-2008, 09:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB