<?php $a = explode( ":", "This:string:has:delimiters."); while (list(,$value) = each($a)) { if (strcmp($value, "has") == 0) { echo "had "; } else { echo $value. " "; } } ?>
Bir damga dizisi(string) “:” karakteri ayraç olmak üzere parçalara ayırılıyor ve bu parçalar bir dizide turuluyor; içerisinde “has” olan değer dah sonra “had” olarak görüntüleniyor.