So let's start creating our first PHP file. The extension for PHP files is .php. You can create a .txt file and just rename it to extension to index.php for example. The name index.php is typically rendered automatically by accessing you domain name.
PHP<?php
echo "<h1>My first PHP page!</h1>";
?>
This will give you:
Now let's stop for a moment and take a look at our code. We can see that it starts with "<?php" and ends with "?>" and we are using echo to output some HTML content. We used quotation marks to wrap the content and we end the line with a semicolon.
There are also some other things to remember:
PHP<?php
// this is a simple variable in PHP
$myVar = "myVar has been set";
echo "<p>This PHP output uses lowercase echo</p>";
ECHO "<p>Here we are using uppercase ECHO</p>";
Echo "<p>And here we are using Capitalized Echo</p>";
echo $myVar;
?>
While you don't need any special editor to create PHP files there are some that are better than others. And since this depends on everybody's tastes and programming background, you can choose one from the list above
Of course there are tones of editors that you can use. Please feel free to leave me a comment and let me know which one is your favorite. You can also find a good list of some other PHP editors on Wikipedia website located here: https://en.wikipedia.org/wiki/List_of_PHP_editors