Wednesday, February 27, 2008

PHP 5 First Touch

Right now the book called PHP5 Power Programming is helping me.
Itll let me learn few basic code which i prefer it that way and i hope i can create MySQL & PHP Application and other app that use PHP5.

im not reading any of chapter 1 but just go straight to chapter 2 that consist Basic Language.

this code is HELLO WORLD with HTML Embedding.

<html>
<head>Sample PHP Script</head>
<body>
The following prints "Hello, World"
<?php
print "Hello World" ;
?>
</body>
</html>

this will lead to this output
<html>
<head>Sample PHP Script</head>
<body>
The following prints "Hello, World"
"Hello World"

</body>
</html>

Comment
/*
* this is C way
*/

// this still is c way

# this is shell way

VARIABLES
its very different from C and Java you dont need to declare their variable before using them, you dont declare their type as result variable can change their type of its value as much as you want.

No comments:

Starting to Learn Wordpress

 I'm gonna start learning wordpress again. I know it's been a while and I'm using Blogger to write everything.  I don't know...