View chart_3dpie.php
<?php
/**
* 3D pie chart with GD library
*
**/
// Create an image
$image = imagecreatetruecolor(100, 100);
// Allocate some colors
View stream_filter.php
<?php
/**
* User defined stream filter sample
* Source: http://php.net/manual/pt_BR/function.stream-filter-register.php
**/
class string_filter extends php_user_filter
{
function filter($in, $out, &$consumed, $closing)
{
View spl_sample.php
<?php
/**
* SPL Sample
*
*/
$file = new SplFileObject(__FILE__);
foreach ($file as $line)
{
View file_sock.php
<?php
/**
* Using file socket to read a page
* Sample from internet
*/
$fp = fsockopen ("slashdot.org", 80);
View sample06_1.php
<?php
/**
* PHP, PDO and SQLite2 example
* The code got from Internet
*
*/
// Set default timezone
date_default_timezone_set('UTC');
View fiddle_365999.php
<?php
function innerHTML($el) {
$doc = new DOMDocument();
$doc->appendChild($doc->importNode($el, TRUE));
$html = trim($doc->saveHTML());
$tag = $el->nodeName;
return preg_replace('@^<' . $tag . '[^>]*>|</' . $tag . '>$@', '', $html);
}
View 19c763e8e5d37d254c5f98549b3ddb64.php
<?php
/* XSLT transformations */
$owner = "PhpFiddle";
$collection_xsl = <<<DOC
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="owner" select="'Nicolas Eliaszewicz'"/>
<xsl:output method="html" encoding="iso-8859-1" indent="no"/>
<xsl:template match="collection">
View fiddle_503425.php
<?php
$_POST['kelas'] = isset($_POST['kelas']) ? $_POST['kelas'] : 0; // this line removes notices (ignore this)
$_POST['tahun'] = isset($_POST['tahun']) ? $_POST['tahun'] : 0; // this line removes notices (ignore this)
?>
<form method='post'>
<select name='kelas'>
<option value=0>Pilih kelas</option>
<option value=1 <?php if($_POST['kelas']==1) echo 'selected' ?> >X-1</option>
<option value=2 <?php if($_POST['kelas']==2) echo 'selected' ?> >X-2</option>
View fiddle_178586.php
<?php
$html = '<table border=1>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
</tr>
View 60504c75bff7ffd941cd23196224c1c8.php
<?php
/* My Color */
$today = date("w");
$bgcolor = array
(
"#FEF0C5", "#FFFFFF", "#FBFFC4", "#FFE0DD",
"#E6EDFF", "#E9FFE6", "#F0F4F1"
);