iSelfSchooling.com - Copyright © 1999-2007 iSelfSchooling.com  References  Job Openings  |  Secure Login
    Home  | Search more...  |  FREE Online VIDEO Oracle Training  |  Gift Store  |  Bookstore

   Unlimited access!   

    Oracle  Syntax  | Suggestions Your Contribution  |  FREE Legal Forms

 

Email2aFriend Homepage us! |  Bookmark   -  Copyright & User Agreement

Products/Services

 Vision/Mission

 Community Sharing

 Services

  Products

 Biography

 Contact Us

 FAQ

 Current News

 Website Traffic

 Bookstore

 FREE Training

 SQL

 PL/SQL

 Forms 

 Reports

 Other TOOLS

 Fundamentals

 Performance

 OEM

 Application Server

 Grid Control

 Articles

 Prepare for OCP

Oracle SYNTAX

 Oracle Functions

 Oracle Syntax

 Oracle 10g Syntax

  PL/SQL Syntax

UNIX and more...

 UNIX for DBAs

 LINUX for DBAs

 DB using PHP

  A+ Certification

 Basics of JAVA  

 Tips of  SEO

Finance/Jobs

 Financial Aid

 Skilled

 Oracle

 Jobs

  Magazine

More Training

 Q & Answers

 SQL-PL/SQL

 DBA

 Developer

 Important Notes

 Case Studies

 9i New Features

 10g New Features

 10g Qs/As

 Grid Control

 OracleAS # I

 OracleAS # II

  LDAP and OID

  HTTP Server

 Instructor-Led

  Virtual Hosts

 Community Sharing

More to know...

Acknowledgement**

 FREE Legal Forms

 Who is who

 Market Place

 University Directory

 Advisory Articles

 Links...

 

 

What are variables or parameters in PHP and how to use them? 

More Resources by Google:

What are variables or parameters in PHP and how to use them? 


Variables or Parameters are temporary containers for data in memory. We have predefined variables and user variables. A predefined variable is a type containing information about the Web server application such as Apache, the Web server operating system such as Linux, Mac, or Windows (Environmental variables), or the PHP module uses. The following is an example of using a PHP’s predefined variable.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitionl.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>The PHP example page, using predefined variable!</title>
</head>

<body>

/* “pre” makes the generated PHP information more legible. $GLOBALS variable
contains all the variables accessible to the script (predefined and user).
*/ 
<pre> 
<?php 
print_r ($GLOBALS); 
?>

</body>
</html>

Save the file in your server running PHP and run the script to see the output.

The following is an example of using a PHP’s user defined variable. When you defined a user defined variable, you must following the following naming convention:
· Must be preceded by $,
· Following with a letter (A-Z, a-z) or an underscore (_),
· Don’t use space or be the same as predefined variables, and 
· They are case-sensitive.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitionl.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>The PHP example page, using user defined variable!</title>
</head>

<body>

<pre> 
<?php 
// my variables - My name and age.
   $my_name = ‘John’;
   $my_age = 84;
   print_r ($GLOBALS); 
?>

</body>
</html>

 

 

 
 
Google
 
Web web site