|
Some about PHP Basics
|
|
04-28-2011, 12:06 AM
Post: #1
|
|||
|
|||
|
Some about PHP Basics
Now I m sharing about Some basic about Php:
- Never forgot use a "$" sign before any variable. In Php: -Echo statement is used to print something on screen link as: <?php echo "Hi, Every one"; ?> the out put of this line is- Hi, Every one - in Php we can also use control statements like as we used in c and c++: If, if else, switch condition; - in Php there is we can also use Loop condition as we used in c and c++; for, while, do while; but in Php we use an extra loop statement also "foreach" statement for fetching the data from an array like this: foreach ($array as $value) { code to be executed; } for example if we have an array animal(cat, dog, cow) and we want to print then <?php $animal=array("cat","dog","cow"); foreach ($x as $value) { echo $value . "<br />"; } ?> the out put will be: cat dog cow to be continued in up coming post.................. |
|||
|
04-30-2011, 06:29 PM
Post: #2
|
|||
|
|||
|
Re: Some about PHP Basics
Good post
![]() Wrap the codes in ![]() UndergroundHipHop.me - Underground Hip Hop Blog |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)

Search
Member List
Calendar
Help





![[Image: k9zyqe.png]](http://i56.tinypic.com/k9zyqe.png)