Database Search
<?php
include ‘incl/db.php’; // Include the database
// Set the page, use one if the get page is not a number or is negative
if(!isset($_GET[‘page’]) || !ctype_digit($_GET[‘page’]))
$page = 1
<?php
include ‘incl/db.php’; // Include the database
// Set the page, use one if the get page is not a number or is negative
if(!isset($_GET[‘page’]) || !ctype_digit($_GET[‘page’]))
$page = 1
<?php
function return_between($string, $start, $stop){
$st = $string;
$list = array();
for($i=0;$i<strlen($string);$i++){
$temp = strpos($st, $start);
$str = substr($st, $temp+1);
$spl
<?php
function page_rank($page, $type = ‘alexa’){
switch($type){
case ‘alexa’:
$url = ‘http://alexa.com/siteinfo/’;
$handle = fopen($url.$page, ‘r’);
break;
case ‘google’:
$url
<?php
$variable = ‘Hello Kitty!’;
if($variable == ‘Kitty’){
echo ‘Goodbye Kitty.’;
}else{
// Note the extra space before "How"
// Remove it and then see what happens…
echo $vari
<?php
// include the database
include ‘db.php’;
$query = ‘INSERT INTO `table_name` (`ownerID`, `favorites`) VALUES ‘;
// This foreach we will pretend that we passed an array of
// checkboxs,
<?php
function is_prime($num){
for($i=$num;$i > 0;$i–){
$v = $num / $i;
if(!is_float($v)){
if($v != $num && $v != 1)
return FALSE;
}
}
return TRUE;
}
for($i = 1;$i<=100;$
<?php
function watermark($file, $watermark, $pos = null, $x = 0, $y = 0){
$details = getimagesize($file);
$wDetails = getimagesize($watermark);
if(!is_null($pos)){
switch($pos){
case TOP
<?php
// Insert into database
mysql_query("INSERT INTO my_table (`column1`, `column2`) VALUES (‘one’, ‘two’)");
// Next Get what the auto incremented number was that was inserted
$id = mysql_inser
It can add arbitrary text and tags to a document. The tags may have optional attributes.
The class can also provide support to generate common HTML for form inputs with data retrieve from submitted inputs or database queries, listing pagination links, list menus, etc..
The class generates XML or XHTML compliant HTML.
It can find and replace BBcode tags and replace it by HTML.
The class provides support to some predefined tags but also allows adding new custom tags that can be either single tags or open and close tags that delimit sections.