1. Computing
Question: How can I learn PHP?
I'd like to learn some PHP to make my website more interactive but I don't know how to get started! Where can I start learning the basics? [view answer]
Comments
August 13, 2009 at 10:42 am
(1) Stefan says:

A – php starting
**************
1. Firstly you have to install php-program on your PC
* it is not simple, the best way is to ask an experienced friend
2. If you will have installed the PHP, it creates your own area on your PC – it means you must all activites make in this php-folder
3) Suppose the folder name is c:\DREAM
4) You must open your browser – IE8, OPERA, Netscape, Firefox, Google Chrome, it does not matter, and if you type : http://localhost/
you are automatic in the folder
4) You must find subfolder where you must type then all php-codes, e.g. I have folder => C:\DREAM\HTTP_Docs
5) Now, you type with text editor any php-code, name it, e.g. MyFirst.php and place MyFirst.php to subfolder C:\DREAM\HTTP_Docs.

If you are right you must see as follows:
a) if you type into browser: http://localhost/HTTP_Docs/MyFirst.php
b) if you use Windows Explorer or File Manager: C:\DREAM\HTTP_Docs\MyFirst.php

B – php codes writing
******************

The most important thing is that:
1. php-cod starts with <? and end with ?>
2. The plain text you write with ECHO command plus you must the text mark and end with ” “;

If you write // – all text after // is ignored (goood for personal examples)

3. You have millions of free examples at internet, including php.about.com (search e.g. with Yahoo, Altavista, Ixquick, Google searching for e.g. php tutorials or php examples or php syntax ECHO)

Examples – how to make simple menu/catalog:
***************************************

Write this text in simple editor, e.g. NOTEPAD in Windows and name it MyFirst.php and place it to subfolder C:\DREAM\HTTP_Docs\MyFirst.php

<?PHP
// this is my first php-cod: C:\DREAM\HTTP_Docs\MyFirst.php;

echo " My catalog“;
// makes text bold and ends it;

echo “ Some links related to php and html: “;
// make text italic underlines text
// is break and makes space between; rows;

echo “ABOUT.com “;
echo “ [Angela Bradley (php)] “;
echo “ Jennifer Kyrnin (html) “;

echo ” Europa “;
echo “ [Educational page] – with links to html – tutorials, e.g.”;

echo ” => [SELFHTML] “;
echo ” [W3Schools-PHP]
“;
echo ” [W3Schools-HTML]
“;

echo “”;
// it makes line in navy color at 90% of row;
?>

NOTES:
* But it is terible with ” html-text “; from the beginning.

* Do not forget – all html text you must ever place between ” *** “; and some character you cannot use, e.g. these: ” \

* Thus, in this way you can make your catalog pages (for leasure, school,…) and then try other php-codes.

August 13, 2009 at 11:40 pm
(2) Zhenechka says:

Angela! Thanks for excellent articles!

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.