This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$datas = array( | |
array('id' => 1, 'parent' => 0, 'name' => 'Page 1'), | |
array('id' => 2, 'parent' => 1, 'name' => 'Page 1.1'), | |
array('id' => 3, 'parent' => 2, 'name' => 'Page 1.1.1'), | |
array('id' => 4, 'parent' => 3, 'name' => 'Page 1.1.1.1'), | |
array('id' => 5, 'parent' => 3, 'name' => 'Page 1.1.1.2'), | |
array('id' => 6, 'parent' => 1, 'name' => 'Page 1.2'), | |
array('id' => 7, 'parent' => 6, 'name' => 'Page 1.2.1'), | |
array('id' => 8, 'parent' => 0, 'name' => 'Page 2'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$xml = " | |
<results> | |
<result> | |
<guid>a</guid> | |
<version>3</version> | |
</result> | |
<result> | |
<guid>b</guid> | |
<version>2</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$id = rand(); | |
$cellSize = 580; | |
$maxClick = 3000; | |
$timeLimit = 30; //in seconds | |
?> | |
<!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" xml:lang="en"> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class A { | |
private $a, $b; | |
public function __construct($ob) { | |
$this->a = $ob->a; | |
$this->b = $ob->b; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo 'asasd'; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php $size = 40; ?> | |
<style> | |
.ball{ | |
height:<?php echo $size;?>px; width:<?php echo $size;?>px; background-color:rgba(0,200,0,.025); | |
position:absolute; | |
border-radius: 50%; | |
text-align:center; | |
line-height:<?php echo $size;?>px; | |
color:rgba(0,59,0,.1); | |
font-family:sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
echo date("l F jS, Y - g:ia", time()); // current date | |
echo("</br>"); | |
echo date("m / d / Y", time()); // current date | |
echo("</br>"); | |
$nextweek= time() + 7*24*60*60; | |
echo gmdate("Y-m-d\TH:i:s\Z", $nextweek); // next week | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$r = 0; | |
$g= 205; | |
$b = 205; | |
printf("<font size='30px', font color='#%X%X%X'>Hello</font><br />",$r,$g,$b); | |
printf("<font size='30px', font color='#%X%X%X'>Hello</font><br />",$r,$g-3,$b-3); | |
printf("<font size='30px', font color='#%X%X%X'>Hello</font><br />",$r,$g-6,$b-6); | |
printf("<font size='30px', font color='#%X%X%X'>Hello</font><br />",$r,$g-9,$b-9); | |
printf("<font size='30px', font color='#%X%X%X'>Hello</font><br />",$r,$g-12,$b-12); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* PDO SQLite initial code | |
* | |
* Using phpLiteAdmin to admin SQLite3 and SQLite2 database : inclibs/util/sqlite3.db, inclibs/util/sqlite2.db | |
* | |
* @package PhpFiddle | |
* @link http://phpfiddle.org | |
* @since 2012 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$object = new StdClass; | |
$object->thor = false; | |
//$object->lock = true; | |
if (!$object->thor && !isset($object->lock)) | |
echo "Show Destroy"; | |
else | |
echo "Hide Destroy"; |