march Posted August 11, 2006 Report Share Posted August 11, 2006 (edited) Tātad meklēšanas rezultātus izceļam ar dzeltenu backgroundu ar funckciju $tekst = str_replace("$w", "<span class=\"highlight\">$w</span>", $tekst); kur $tekst ir viss teksts un $w ir meklējamais teksts. Problēma: meklējot frāzi "example" mysql atrod gan "example", gan "Example", bet str_replce atrod tikai "example", bet "Example" neiekrāso. Ir kāds risinājums? Edited August 11, 2006 by march Link to comment Share on other sites More sharing options...
bubu Posted August 11, 2006 Report Share Posted August 11, 2006 Manuālī pat neielūkojies ... http://lv.php.net/str_replace apakšā ir links uz http://lv.php.net/str_ireplace ... Daudz bija jāizdara? Link to comment Share on other sites More sharing options...
march Posted August 11, 2006 Author Report Share Posted August 11, 2006 Paldies, manuālī skatījos tikai to funkciju nez kā biju palaidis garām Link to comment Share on other sites More sharing options...
Delfins Posted August 12, 2006 Report Share Posted August 12, 2006 Manuālī pašās beigās pēc galvenā apraksta sadaļa "See also" praktiski vienmēr ir atbildes :) .. vai komentāros Link to comment Share on other sites More sharing options...
Recommended Posts