Total members 10262 | Gratitudes |It is currently Thu May 24, 2012 5:15 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 7 posts ] 
Author Question
 Question subject: Beginners Guide To PHP!!!!!
PostPosted: Thu Jun 28, 2007 10:43 pm 
Offline
Beginner
User avatar

Joined: Wed Mar 28, 2007 1:17 pm
Posts: 118
Location: Cairo-Egypt
Has thanked: 0 time
Have thanks: 5 time

What Is PHP?
--------------------------------


PHP stands for Hypertext PreProcessor. It is a server-side scripting language. The PHP code can be mixed in with regular HTML tags and parsed on the server. PHP first showed up in the form of a set of Perl scripts that the creator, Rasmus Lerdorf, used to manage his online resume. Later, it was adapted by Andi Gutmans and Zeev Suraski in 1997 to use a C-written compiler. It was an entire remake of Lerdorf's that turned PHP into the web language we know today.

What Can PHP Be Used For?
--------------------------------------------


PHP is used in the creation of dynamic web pages. It is popular among many web developers due to its fast parsing and flexibility. PHP is a popular tool for managing a form's data after it is submitted. It is also extremely versatile and comes built in with many different interfaces and API's. It has database capability built into the language, the most common database being MySQL. PHP can generally connect to any SQL enabled database.

What Is The Syntax Like?
--------------------------------------------------------------------

PHP is similar in structure to Perl and C. You use curly braces { }, to define blocks of code, and the semi-colon to specify the end of a statement. If you are familiar with Perl, then you should have no difficulty learning PHP. It maintains all the traditional loops, if/else, and subroutines that are expected in a programming language. One difference you will note is that the code is ?embedded in with the HTML, but you can use a seperate file instead. The PHP code is differentiated from HTML code by use of the <?php and ?> opening and closing tags. These tell the server that when it finds a PHP file, to scan through for these tags, and execute the code in between them. The server recognizes a PHP enabled file by it's extension, .php. These are essentially HTML files with PHP code in them.


An Example PHP Program
------------------------------------------------------------------

This is an example of a PHP parsed web page.

Code:
<
?php   
// Specify title of page   
$title = 'PHP Test'; ?>
<html>
<head>
<title> <?php echo "$title"; ?> </title>
</head>
<body>

<
?php   
// Create an array with each word of statement.   
$myArray = array('This', 'is', 'a', 'PHP', 'test.');   
// Loop through array and print each word   for ($i = 0; $i <
5; $i++) {     echo "$myArray[$i]"
;   
} ?>
</body>
</html>


What Do I Need To Get Started?
------------------------------------------------

PHP requires only a server with PHP installed and a simple ASCII text editor such as Notepad (standard on all Windows machines), or VI, eMacs, Kate, etc. for a UNIX/Linux machine. PHP can be downloaded here.

Common PHP Problems
------------------------------------


PHP is case-sensitive, meaning that if you name a variable $MyVar, you cannot call it as $myvar or $mYvAr. Also, forgetting to close your curly braces. It helps to indent lines inside curly braces so that any missing braces can be spotted more easilly.
Note: There are many good books in the php books section you can start now.
Thanks alot.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Tue Aug 19, 2008 5:10 am 
Offline
Newbie
User avatar

Joined: Tue Aug 19, 2008 5:03 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Hi,
I am beginner of PHP and I need tutorials or site for it.Please help me.

contact_ausaf@yahoo.com


Dubai Directory - Links Business & Real Estate|UAE & Dubai Business Services Directory|Sports Wholesalers & Suppliers Directory|Something Directory :read:


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Sun Feb 15, 2009 4:01 pm 
Offline
Newbie
User avatar

Joined: Sun Feb 15, 2009 3:40 am
Posts: 6
Has thanked: 0 time
Have thanks: 0 time
PHP is just declaration of variable strings and most functions are used to execute some strings declared from the variables.


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Mon Feb 16, 2009 3:37 am 
Offline
Newbie
User avatar

Joined: Mon Feb 16, 2009 3:28 am
Posts: 1
Has thanked: 0 time
Have thanks: 0 time
Well, i think i should spend my whole time in this forum... :gOOd:


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Thu Feb 26, 2009 6:14 am 
Offline
Newbie
User avatar

Joined: Wed Feb 25, 2009 1:48 pm
Posts: 3
Has thanked: 0 time
Have thanks: 0 time
Hi ausaf

What do you need on PHP and what kind off tutorials ?

check out http://www.php.net


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Wed Apr 22, 2009 7:26 am 
Offline
Newbie
User avatar

Joined: Sat Apr 18, 2009 1:20 pm
Posts: 20
Location: UK
Has thanked: 0 time
Have thanks: 0 time
Yup i agree php.net is a good source to get tutorials about PHP, anyhow thanks for the great article

_________________
Lincoln Solicitors


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Beginners Guide To PHP!!!!!
PostPosted: Sun Apr 26, 2009 11:03 am 
Offline
Newbie
User avatar

Joined: Sun Apr 26, 2009 10:56 am
Posts: 2
Has thanked: 0 time
Have thanks: 0 time
You can find the best PHP tutorials at http://www.emammablog.com


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 7 posts ] 
Quick reply


  

 Similar topics
 Cisco 642-813 exam study guide
 Free Quality Comparison Guide to VoIP
 Guide for GMAT
 Beginners / Exercises &Assignments
 A beginner's guide to Object Orientation
 A Beginner's Guide to Pointers
 The Java Programmers Guide to Numerical Computing.
 C# .NET Web Developers Guide
 MS Press Windows Group Policy Guide
 Mcgraw hill - Network+ certification guide

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team