aldis Posted November 18, 2007 Report Share Posted November 18, 2007 Nju agrak kad macijos programmesanu, k-ko rusinaju, ieksh visual basic bija funkcija InStr! Tas ir.. piemeram: Ja mainigajaa [piemeram tekstaa] ir fraze [abols] tad mainigo parversh par tekstu [neko nezinu] if ($mainigais == InStr('abols')) $mainigais = 'neko nezinu'; php.net/instr man neko ipasu nepastasta! Jautajums - vai tada funkcija pastav ieksh php? un ja kads zin, tad varetu pateikt! Iespejams ka pasham jaraksta tada funkcija!? Link to comment Share on other sites More sharing options...
ViszinisA Posted November 18, 2007 Report Share Posted November 18, 2007 shi neder? http://lv.php.net/manual/en/function.strstr.php vai http://lv.php.net/manual/en/function.preg-match.php vai arii izlasi visu funkciju isu parakstu... tur skiet bij vairakas, kas nodarbojas ar mekleeshanu http://lv.php.net/manual/en/ref.strings.php Link to comment Share on other sites More sharing options...
andrisp Posted November 18, 2007 Report Share Posted November 18, 2007 (edited) if (strpos($str, 'abols') !== false) { $str = 'bla'; } Edited November 18, 2007 by andrisp Link to comment Share on other sites More sharing options...
marcis Posted November 18, 2007 Report Share Posted November 18, 2007 (edited) $mainigais=str_replace("abols","neko nezinu",$mainigais); Edited November 18, 2007 by marcis Link to comment Share on other sites More sharing options...
andrisp Posted November 18, 2007 Report Share Posted November 18, 2007 marcis, imo, tas nav tas, ko topika autors vēlējās. Link to comment Share on other sites More sharing options...
aldis Posted November 18, 2007 Author Report Share Posted November 18, 2007 Paldies AndrisP ;) traapiic desmitniekaa! :) Link to comment Share on other sites More sharing options...
Recommended Posts