Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • PHP (Moderator: De KoFfieŠ) »
  • Common PHP Codes
« previous next »
  • Print
Pages: [1]

Author Topic: Common PHP Codes  (Read 5096 times)

Offline Seth Mitchell

  • The Music Man
  • Zealot
  • *
  • Posts: 528
  • I am the Music Man
Common PHP Codes
« on: March 27, 2006, 02:04:52 AM »
What are some common PHP codes.

 I just need some basic ones for my new site.
Logged
Image hosted by Photobucket.com

Offline Osmose

  • So freakin' inactive
  • Royal
  • *
  • Posts: 3,041
(No subject)
« Reply #1 on: March 29, 2006, 01:40:44 AM »
Well, PHP is not like HTML - there are no "codes" persay, it's a programming language that works into websites. Even so, the most simply command in PHP is

print ("Stuff that is displayed on the webpage.");

Simple math operations work too.

$a = 2 + 7

The $a declares a variable named $a. If you decide to put something like

print ($a);

It will print "9". It works in the math part too.

Those are the simple basics. If you're interested in more, just ask and I'll tell you about conditionals.
Logged
Hrm.

Offline GaryCXJk

  • <strong>Official Charas.EX Team Member</strong>
  • Exemplar
  • *
  • Posts: 1,586
  • FOUR OH FOUR'D
    • Multiverse Works
(No subject)
« Reply #2 on: March 29, 2006, 08:53:03 AM »
PHP an HTML is interchangable by the way:

<html>
<
head>
<
title><? echo date("l j F Y H:i.s");?></title>
</head>
<body>
<?php
//This is a comment, and won't be displayed
for($i = 0; $i < 10; $i++)
{
echo 
$i;
}
?>
</body>
</html>


Also, follow the PHP lessons to know more about PHP.
Logged

Play it now! Charas Breakout DX
Area91: for MUGEN and RPG Maker VX Ace stuff

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Off-Topic »
  • Archive »
  • Really Old Stuff »
  • PHP (Moderator: De KoFfieŠ) »
  • Common PHP Codes
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum