
Search In
This method is really useful when any user want to add module inside component.There must be situation where user need to display specific module for component below is the code which will works:
$position = 'typemoduleposition';
$modules =&a
For write error in a file we use error log. In cakephp we can create error by using keyword CakeLog. For example
try {
//code here
} catch(Exception $e) {
CakeLog::write('error1', $e->getMessage());
}
and yo
Hello reader's today we discuss about "How to write a simple Plugin in wordpress".
If you want a to write own Plugin in WordPress there are some steps you must follow and these steps are mention below:
Plugin name should be unique(the name should
PHP Implode convert an array into string in PHP. If you are looking same functionality in jquery, please use below code::
var arrName = ["Saab", "Volvo", "BMW"];
var allname = arrName.join(', ');
alert(allname);
// arrName is a javascript array
Hello Friends,
If you are looking to insert data in wordpress database. Please follow the below code for the same::
global $wpdb; //define db object in Wordpress
$data['first_name'] = $_REQUEST['fname'];
$data['last_name'] = $_REQUEST['lname'];
$d
In MySql you have normally used below code to find by like
select * from users where name like '%text%'
But in order to use “like” in mongoDb you have write the below code:-
You can use the actual regex object via MongoRegex
db.collectionName.fi
WordPress is one of the most popular and simple platforms for blogging. It has themes, plugins, widgets and functions/resources which are used to improve your blog or website. WordPress provide most of the themes and plugins free which are developed
If you want to know weather the session is already begin or not in PHP then, you can use of the syntax from PHP manual
see the example below
if (!isset($_SESSION)) session_start();
2.
And in case you are using PHP < 5.4 you have to the code
Codeigniter gives the facility to create own helper according to requirement. You can code easily and call inside the codeigniter controller or model.
1) Create a file and put the following code into it.
if ( ! defined('BASEPATH')) exit('No direct
Hello Reader's!, If you are looking for a code that can give the directory size from a given path, Then you can use below library code for both Windows and Linux hosting:-
If on a Windows Host:
<?
$filePath = 'c:/www/myfolder';
$obj = ne
