Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <?php
- function toAscii($letter){
- return ord($letter);
- }
- function toBinaryAscii($letter){
- return decbin(ord($letter));
- }
- function eachLetterInWord($word){
- $strlength=strlen($word);
- for($i=0; $i <$strlength; $i++){
- echo toBinaryAscii($word[$i])." is the binary for ". toAscii($word[$i]). " which is the ascii for ".$word[$i]."<br>";
- }
- }
- eachLetterInWord("Basu");
- ?>
- </html>
Add Comment
Please, Sign In to add comment