Understanding PHP basics: Difference between revisions
From Leechfinger
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Get PHP info == | |||
<syntaxhighlight lang="bash" line> | |||
<?php | |||
phpinfo(); | |||
?> | |||
</syntaxhighlight> | |||
Let's write our first PHP code. | Let's write our first PHP code. | ||
<syntaxhighlight lang="PHP" line> | <syntaxhighlight lang="PHP" line> |
Revision as of 14:27, 25 May 2024
Get PHP info
<?php
phpinfo();
?>
Let's write our first PHP code.
<?php
echo "Hello from PHP";
?>
Storing values in a variable
<?php
$myName = "Kooka";
$friendsName = "Loopa";
echo "<p>I am $myName and I have a friend called $friendsName.</p>";
?>