How to read file using php.Following example is describes how to read and display file content using php.php fopen() and fread() functions will help to do this.
Continue reading How to read file using PHP
If you want to get last week dates using php, that can be get from the following example. Continue reading PHP get last week date
This mysql query help to get data from the wp_posts table of the wordpress.It will get any data from the wp_post table.Only you have to set the condition in the WHERE clause of this query.
Continue reading WordPress get data from wp_post table
How to add new element to an array using php.array_push() php core function can be use for this.It will adding new element to ad array.
Continue reading PHP add element to an array
How to get array size of the php.Simply php count() and sizeof() functions get array size. Continue reading PHP get array size
If you want to get duplicate values count in an array,this method can be use easily.It will display array values all count. Continue reading PHP get duplicate values count in an array
How can I find elements in an array using php.Here is a simple small example to find element an array.Youcan use php in_array() function to this.
Continue reading PHP find elements in an array
How to validate Email address using php.This can be easily done by php regular expressions. Here is a email validation example.Only you have to call to this validation function and it will return it true or false.
Continue reading PHP Validate Email Address
Add twitter feeds to your website is easier using JQuery by placing a link to it in your page’s header.And put the twitter feeds div anywhere you want your tweets to get displayed on your page.
Continue reading Get Twitter feeds to your web site using JQuery
What is the error() method of the jquery and how to use it.This article is describing how to use it,usages,issues and so on.The error event is sent to elements, such as images, that are referenced by a document and loaded by the browser. It is called if the element was not loaded correctly.
Syntax : .error(handler(eventObject))
Continue reading JQuery error() method
Q:- I want to validate date range or if exist date range by using java script.
This is can be done using Date() object.Look at the following function.It will return date range is valid or not.Simply you have to pass start date and end date only.
When we working with iframe if we want to access iframe elements using JQuery.If you try to access using ID, class or other attributes may be you can’t access those.Here is a simple effective method to do this.
How to detect this is a iframe or not, using php.You can check the referrer to determine if a request came from a another page on your own site or from a third-party site, or if it was direct traffic.So $_SERVER[‘HTTP_REFERER’] can be use to this.
As noted this method is not foolproof, but may provide more information than your application currently receives.
Continue reading How can I detect iFrame using PHP
Sometimes when we using php, we want to convert php array to java script array.php array can be convert to java script easily.Here is a easy and best methods to do this.
PHP provides json_encode() function to convert PHP arrays into Java Script code.
Continue reading PHP array convert to Java Script array
How can I detect browser using php.You can use php server variable $_SERVER[‘HTTP_USER_AGENT’] for this.It will return about the user’s operating system, as well as their browser.It contents of the User-Agent header from the current request.
So simply you can echo this for more understand.
Continue reading PHP Detect Browser
Continue reading How to delete all cookies using Java Script
How to get data/meta data from the wp_options table in the wordpress .In this table, option_values are(some values) saved as serialized .So directly we can’t get those values.Now I’ll tell you easy method to get this value from wp_options table.
I want to get option name – “feedburnercount/feedburnercount.php”, values.
Values like this. Continue reading WordPress get meta data from wp_options table
How to check if user is logged or not in the view or controller in cakephp.Very simple.Look at this function.It will return current logged user details.So you can check this by using user ID or user name to if user logged or not.
In the controller, Continue reading Cakephp check if user is logged or not
If you are not installed magento previously this is a problem you faced.After installation magento returns a message that the installation was successful and you can proceed to the administration panel. Although providing the correct username / password, magento does not show anything. Providing wrong username / password , magento returns the message “Invalid Username or Password”.If you login from different browser same effect will happening.
The login attempt was made through the “localhost ” or ” 127.0.0.1? socket , but you can’t log in to admin panel.The problem occurs because magneto could not store cookies. Localhost and “127.0.0.1? are not true domains , and browsers allow only real domains to store cookies ,that’s why login stops without any indication.
Continue reading Magento can’t login admin panel after installed