Blame | Last modification | View Log | RSS feed
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /><title>2.2. Creating the Object</title><link rel="stylesheet" type="text/css" href="phplotdoc.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.78.1" /><link rel="home" href="index.html" title="PHPlot Reference Manual" /><link rel="up" href="starting.html" title="Chapter 2. Getting Started with PHPlot" /><link rel="prev" href="starting.html" title="Chapter 2. Getting Started with PHPlot" /><link rel="next" href="starting-simple.html" title="2.3. A Simple Graph" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.2. Creating the Object</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="starting.html">Prev</a> </td><th width="60%" align="center">Chapter 2. Getting Started
with PHPlot</th><td width="20%" align="right"> <a accesskey="n" href="starting-simple.html">Next</a></td></tr></table><hr /></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="starting-create"></a>2.2. Creating the Object</h2></div></div></div><p>
You create a PHPlot object by first including the code to be used,
and then defining the variable:
</p><pre class="programlisting"><?php
require_once 'phplot.php'; // here we include the PHPlot code
$plot = new PHPlot; // here we define the variable
//Rest of code goes below
</pre><p>
</p><p>
The above code assigns the PHPlot object to the variable
<code class="literal">$plot</code>.
</p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="starting.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="starting.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="starting-simple.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 2. Getting Started with PHPlot </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 2.3. A Simple Graph</td></tr></table></div></body></html>