how to deal with a sentence as a page title?

<?php
$hotel=”  How to study PHP  “;
$hotel= trim($hotel);
$array=explode(” “, $hotel);

$hotel=implode(“-“, $array);
echo ($hotel);
?>

Posted in Php Skills. Comments Off on how to deal with a sentence as a page title? »

How to change phpld title seperator

Want to change the seperator between categories in the title tag?

At the moment the phpld generate the title as:
home – category – category – category
(more…)

Posted in PHP Link Directory. Comments Off on How to change phpld title seperator »

Get current url

<?php
//get the current page URL that is shown in the browser URL window

function curPageURL() {
 $pageURL = ‘http’;
 if ($_SERVER[“HTTPS”] == “on”) {$pageURL .= “s”;}
 $pageURL .= “://”;
 if ($_SERVER[“SERVER_PORT”] != “80”) {
  $pageURL .= $_SERVER[“SERVER_NAME”].”:”.$_SERVER[“SERVER_PORT”].$_SERVER[“REQUEST_URI”]; (more…)

Posted in Php Code. Comments Off on Get current url »

How to control the tag cloud font size?

Just add the following code at any place you need to let the tag show:

if ( function_exists(‘wp_tag_cloud’) ) :

  • KingPHP.com Tags

      wp_tag_cloud(‘smallest=8&largest=8’);

 

Posted in WordPress. Comments Off on How to control the tag cloud font size? »

Php test Navigation engine laguage, and Syetem language

Php test Navigation engine laguage

< ?php echo $_SERVER["HTTP_USER_AGENT"]; ?>

Php test Syetem lang

< ?php echo $_SERVER["HTTP_ACCEPT_LANGUAGE"]; ?>

(more…)

Posted in Php Code, Php Skills. Comments Off on Php test Navigation engine laguage, and Syetem language »

Disordered Chinese Characters in Phpld

Open init.php, between
$db->SetFetchMode(ADODB_FETCH_ASSOC);
read_config($db);

add MySQL_query(“SET NAMES ‘latin1′”);

let them becomes: (more…)

Posted in PHP Link Directory, Php Skills. Comments Off on Disordered Chinese Characters in Phpld »

Finding Items in an Array or not with PHP

The problem: we have an array of items in PHP and we want to find out if a specific item is in the array. In code we can define the array as:
(more…)

Posted in Php Functions, Php Study. Comments Off on Finding Items in an Array or not with PHP »

how to add php code in phpld, find current url?

It is very simple,just like this:

{php}
echo “PHP
“;
echo “I love PHP
“;
echo “included in .tpl
“;
{/php}

Find the Current URL with PHP (more…)

Posted in Php Learning, PHP Link Directory. Comments Off on how to add php code in phpld, find current url? »

Host 2 domains for the same wordpress database.

Q:Me and a friend are trying to make http://kingphp.com and www.chinascience.org the same… I hosted his domain on my hosting as an add-on domain. (more…)

Posted in WordPress. Comments Off on Host 2 domains for the same wordpress database. »

Mass Post Manager for WordPress

This plugin performs the following tasks:

Delete all posts and/or comments in selected category
Move all posts from one category to another
Plugin was developed for may needs so its functionality is quite limited right now. However i plan to add more and more features to Mass Post Manager (more…)

Posted in WordPress. Comments Off on Mass Post Manager for WordPress »
King Php Science Designed by:KingPhp.com Welcome, you are from: 54.158.25.146