<?php
echo get_cat_name( $catID )
?>
<?php
echo get_cat_name( $catID )
?>
<script type=”text/javascript”>
alert( document.URL );
</script>
<?php
function getCurrentCatID(){
global $wp_query;
if(is_category() || is_single()){
$cat_ID = get_query_var(‘cat’);
}
return $cat_ID;
}
echo $getCurrentCatID();
?>
<?php
$content = get_the_content();
echo substr(strip_tags($content), 0, 100);
?>
<?php
foreach((get_the_category(POST-ID)) as $category) {
echo $category->cat_name;
}
?>
<?php
mysql_list_dbs();
Example :
$connection=mysql_connect(“localhost”,”root”,”password”);
$dataBases = mysql_list_dbs($connection);
while ($db = mysql_fetch_object($dataBases)) {
echo $db->Database . “<br />”;
}
?>
<?php
mysql_affected_rows();
?>
<?php
if ( class_exists( “class-name” ) ) {
echo “Exists”;
}
?>
<?php
mysql_close();
?>
<?php
mysql_select_db (DB-NAME)
?>