Gå til innhold

litt kode testing


Rasks

Anbefalte innlegg

<?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 av Rasks
Lenke til kommentar
Videoannonse
Annonse
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 = '';

Lenke til kommentar
Gjest
Dette emnet er stengt for flere svar.
×
×
  • Opprett ny...