<html>
<p>
<?php
// Print out the position of a letter that is in
// your own name
$name = "Anonymous";
print strpos($name, "o");
?>
</p>
<p>
<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if(strpos($name, "z")===false){
print "The letter 'z' was not found in $name.";
}
?>
</p>
</html>
No comments:
Post a Comment