Your web server directory path will depends on what Web Server you install:
- Wamp Server: C:\wamp64\www
- Xamp Server: C:\xampp\htdocs
# Write first code of your php
- Example: 1
echo 'Hi Netwax Lab';
?>
Output
Hi Netwax Lab
- Example: 2
print 'Hi Netwax Lab';
?>
Output
Hi Netwax Lab
- Example: 3
print "Hi Netwax Lab";
?>
Output
Hi Netwax Lab
# Commenting in php
- Example: 4
//comment type 1
# comment type 2
/* comment
type 3*/
$x = 5+/* 15+ */5; //comment type 4 (in betwwen code line)
echo $x;
?>
Output
10
# Case Sensitivity php
- Example: 5
ECHO "Hi Netwax Lab!<br>";
echo "Hi Netwax Lab!<br>";
EcHo "Hi Netwax Lab!<br>";
?>
Output
Hi Netwax Lab!
Hi Netwax Lab!
Hi Netwax Lab!
- Example: 6
$color = "red";
echo "My tie is " . $color . "<br>";
echo "My shirt is " . $COLOR . "<br>";
echo "My shoe is " . $coLOR . "<br>";
?>
Output
----
No comments:
Post a Comment