Rasks Skrevet 11. mai 2007 Skrevet 11. mai 2007 (endret) <?php $var = "thing"; if (isset($tvar)) { echo "var is set"; } else { echo "var is not set"; } $num = 5; if (is_numeric($num)) { echo "num is a number"; } else { echo "num is not a number"; } echo "script executed"; ?> PHP <?php $num = 5; if (is_numeric($num)) { echo "num is a number"; } else { echo "num is not a number"; } echo "php??"; $num = 5; if (is_numeric($num)) { echo "num is a number"; } else { echo "num is not a number"; } ?> PHP <?php $num = 5; if (is_numeric($num)) { echo "num is a number"; } else { echo "num is not a number"; } echo "php??"; ?> Endret 11. mai 2007 av Rasks
Zethyr Skrevet 13. mai 2007 Skrevet 13. mai 2007 CODE function rot13( $text ){ $codec_text = ''; $len = strlen($text); for ( $i=0; $i < $len; $i++ ) { $k = ord($text[$i]); // 65-77 to 78-90 and 97-109 to 110-122 if ( ($k >= 65 && $k <= 77) || ($k >= 97 && $k <= 109) ) { $codec_text .= chr($k+13); } // 78-90 to 65-77 and 110-122 to 97-109 elseif ( ($k >= 78 && $k <= 90) || ($k >= 110 && $k <= 122) ) { $codec_text .= chr($k-13); } else { $codec_text .= chr($k); } } return $codec_text;} function rot13( $text ) { $codec_text = ''; $len = strlen($text); for ( $i=0; $i < $len; $i++ ) { $k = ord($text[$i]); // 65-77 to 78-90 and 97-109 to 110-122 if ( ($k >= 65 && $k <= 77) || ($k >= 97 && $k <= 109) ) { $codec_text .= chr($k+13); } // 78-90 to 65-77 and 110-122 to 97-109 elseif ( ($k >= 78 && $k <= 90) || ($k >= 110 && $k <= 122) ) { $codec_text .= chr($k-13); } else { $codec_text .= chr($k); } } return $codec_text; } CODE $codec_text = ''; $codec_text = '';
Anbefalte innlegg