$text = "I said, no."; print "First occurence of \"no\" is at position: " . index($text, "no") . "\n"; print "Last occurence of \"no\" is at position: " . rindex($text, "no") . "\n";