From time to time, I get questions from visitors like "Is there a WYSIWYG editor for PHP?" or "I want to create a website. Should I use PHP or HTML or some other language?". As existing webmasters know, such questions betray a fair amount of confusion about these technical terms, mixing up items from completely different categories. I will attempt to answer the questions here, clarifying any misunderstanding along the way.
PHP is a programming language. Programming languages are things people use to create computer programs like Microsoft Word, Solitaire, Microsoft Windows and stuff like that.
HTML, on the other hand, is a document formatting language. It just tells the web browser (the program you're using to read this article) what a document is supposed to look like: for example, whether certain words are in bold, which font to use, what colour ("color" in US English) to display for the text and background, etc.
PHP and HTML are thus completely different things, designed for different purposes. Asking whether one should use PHP or HTML to design a website is like asking whether a person should use electricity or concrete to build a house.
At this time, all websites, if they hope to be viewable in a web browser or easily found in a search engine like Google, have to be in HTML. More about this later.
WYSIWYG stands for "what you see is what you get". When applied to wordprocessors (like Microsoft Word), it means that what you see on the screen as you type your document is (almost) exactly what you will see on paper when you print out that document. When applied to web editors, it means that what you see on the screen as you design your web page is more or less what you will see in your web browser when you publish that page onto the Internet.
When you use a WYSIWYG web editor, you don't have to worry about HTML or anything like that. The web editor takes care of creating the correct HTML code for your web page for you. All you need to do is to focus on your content and the visual appearance of your web page. That's why a lot of people go for WYSIWYG web editors to create their websites; it lets them concentrate on the important things, and leave the drudge work to the editor.
However, when someone says he/she is looking for a WYSIWYG editor for PHP, that person is mixing concepts from two different categories. Take for example the following PHP program, simplified from my PHP Tutorial:
Every time the above program is run, it takes some information and sends it to
firstname.lastname@example.org in an email. What can a WYSIWYG editor display in such a case? The above program is
already in a "WYSIWYG" format (if I must use the term here). What you see above is indeed what you get, but for the
uninitiated, you probably see less than what you get.
To put it in another way, WYSIWYG editors are irrelevant for computer programming languages. Programming languages are not documents meant for printing or display in a web browser. They are a series of instructions for the computer, like "at 3 am, run a backup program to back up the contents of my hard disk to an external USB drive". (Of course it's not that simple, and programs are certainly not written in the English language as it was in this example. It'll be in whatever programming language you choose, be it PHP or Perl or whatever.)
Anyway, so that you don't think I'm trying to avoid your question, you can use any programmer's editor (ASCII text editor) to write your PHP programs. There are tons of those on the Free Programmer's Editors and ASCII Text Editors page. Most of the non-WYSIWYG web editors on the Free HTML Editors page should also work fine. If you already use Dreamweaver to design your website, you can also switch it to its code mode and use it to write PHP files. (To do that, click the "View" menu, followed by the "Code" item on the menu that appears.) Or, if you use Windows and enjoy pain and suffering, you can also use the rudimentary text editor Notepad (found in the Accessories folder of your Start menu).
If you're thinking of starting a website, and were confused trying to decide on a language to use, don't be. There is nothing to decide. You will always need HTML.
Tutorials for the commonly used web editors can be found in the following pages:
Before you rush into those tutorials, I strongly recommend that you read How to Make / Create Your Own Website: The Beginner's A-Z Guide. The guide takes you through all the steps involved in creating a website. There's more to starting a website than using a web editor.
There are of course people who, for some reason or other, find that they need to learn PHP to perform some task above and beyond what a normal web page can do. (For example, you're trying to create a search engine of your own.) If you can't make use of the prebuilt PHP programs written by others, and need to write your own, start by reading some PHP tutorials. The absolute beginner may want to start with PHP Tutorial: How to Write Your First PHP Script.
Be warned though: programming is not the same as designing a website. In my experience, some people who have no trouble creating websites have great difficulty learning a programming language. They involve different skills: it's like asking a talented poet to learn to repair a motorcycle. Of course it's doable, but your skills in one do not necessarily translate to the other. On the other hand, if you already have a programming background or have a talent for programming, then PHP is actually a very easy language to learn.
For those who have never created a website before, I suggest you make one first before you learn PHP. Since PHP is primarily a language designed to work on websites, some knowledge of web page making and even HTML is necessary if you want to write anything other than trivial programs.
There's a plethora of information around on different aspects of creating websites. The newcomer, exposed to such information piecemeal, can easily become very confused with the jargon being used. This article, hopefully, has answered some of your questions and helped you take that first step of getting your site on the Internet.
This article can be found at http://www.thesitewizard.com/php/wysiwyg-editor.shtml
Do you find this article useful? You can learn of new articles and scripts that are published on thesitewizard.com by subscribing to the RSS feed. Simply point your RSS feed reader or a browser that supports RSS feeds at http://www.thesitewizard.com/thesitewizard.xml. You can read more about how to subscribe to RSS site feeds from my RSS FAQ.
This article is copyrighted. Please do not reproduce this article in whole or part, in any form, without obtaining my written permission.
It will appear on your page as: