Am am pretty new to PHP, but trying really hard to learn. My problem is this. I downloaded this rot13 function
- Code: Select all
<?
//******************************************
//
// Name: rot13
// Description:Rot13ify's any string.
// See also http://nehwon.xtn.net/rot13/
// by Christopher Heschong
// By: PHP Code Exchange
//******************************************
Function rot13($string) {
for($i=0;$i<strlen($string);$i++) {
$j=ord($string[$i]);
if ((($j>=ord("n")) & ($j<=ord("z"))) | ($j>=ord("N")) & ($j<=ord("Z"))) {
$j=$j-13;
}
elseif ((($j>=ord("a")) & ($j<=ord("m"))) | ($j>=ord("A")) & ($j<=ord("M"))) {
$j=$j+13;
}
$new.=chr($j);
}
return($new);
}
?>
and I want to put it in a form to make a rot13 translator to text/text to rot13. I have read everything, and been at this for days but cant seem to get it :cry: Can someone please give me a small working example of how this would be used in a form to help get me going in the right direction? Thanks in advance



: