Welcome to Abdul Malik Ikhsan's Blog

php code for vb coder

Posted in Tutorial PHP by samsonasik on February 9, 2008
Code:
<?$i = 1;while ($i <= 10):
echo $i;
$i++;
endwhile;
?>
Code:
<?for ($x=1;$x<=10;$x++):
echo “tes$x”;
endfor;
?>
Code:
<?
$a=3;
if ($a==1):
echo “satu”;
echo “yup satu”;
elseif
($a==2):
echo “dua”;
echo “yup dua”;
else:
echo “tiga”;
echo “yup tiga”;
endif;
?>
Code:
<?
$nama = “ikhsan”;
switch($nama):
case “ikhsan”:
$ket=”ganteng”;break;
default:$ket=”biasa aja tuh”;
endswitch;echo $ket;?>

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: