
Search In
Some time you may need to find the day, hour and min and seconds for ex:
*you entered a number 105
and you want 1h-45Min ago*
then you can simply use the following function although you can use your custom function as well depends on the need.
Fu
SESSION-
A session contains user information on server side. When a user opens a page, then the information is first transferred to the server, then php will match that information to the server-side cookie.
If the browser is closed once, all the d
Hello Readers,
We have heard this Timezone Warning many times whenever we build Cakephp project from scratch.
The warning message is as below:
Warning: strtotime() [http://php.net/function.strtotime]: It is not safe to rely on the system's timez
Hello Reader's! If you are new to WordPress and you have to create the menu for first time. You just have to do the steps below:-
Step1:- Open or Create a file functions.php in your theme folder and paste the code below:-
add_action( 'after_setup_t
Hi. If you are looking for code to alert user if his cookies are enable or not, Then look the code as below:-
paste the code in you file
<?php
if (isset($_COOKIE['cookieCheck'])) {
echo 'Your cookie is Enable';
} else {
if (isset($_GET[
core.php (inside /app/config/) has lot of features that help us improve our web application.
Configure::write(‘Asset.timestamp’, ‘force’);
Setting the Asset.timestamp to force will add a time value after every css,js and image tag in your HTML. Th
Hello friends,
If you want to count all the values in an array means you want that how much time a value is exist in an array then you can use a predefined PHP function which is "array_count_values()". array_count_values() returns an array using the
The Carbon class is inherited from the PHP DateTime class.
Example:
<?php
class Carbon extends \DateTime
{
// code here
}
?>
There are n number of situation when we want to get the 1 day or 2 days old data. For this we will do calculati
Sometime we face issues in reindexing like "Some problem with reindexing process" error, there are many reasons for it -
1) maximum execution of script
2) number of products in database and store view
3) locked files of previous process
To get
Hello Reader's If you have a string with words occurs more than two times then here you can see how to remove them as a single.
Lets see the string below full of random words and 34 is repeating.
$mystring = '2,34,two,findnerd,logic,66,34,55,blog';
