Calling Model's method is against the CakePHP conventions. Model methods should be called in controller function and then result should be set as vari
Read MoreAlthough this is the not CakePHP way to call controller's method from within the view file, but if no other way then its possible to call controller's
Read MoreHi friends, Here is the how to list previous 12 months since current month in PHP in a very easy and self explanatory way, please use this code and
Read MoreTo get upcoming 12 months since current month you can use below code:
Read MoreThe date/time functions return you date and time of the server where your PHP scripts are hosted. After getting the date or time you can manipulate ac
Read MoreYou can redirect page without using Header. See below code,
Read MoreYou can sort array at the time of fetching data by using order in Model find function, but in case due to any reason if you could not get the array i
Read MoreRecently I spent some time on web and studied about lots of WordPress Google XML sitemap plug-ins. There are lots of good plug-ins are available on W
Read MoreIf you want to compare two dates just convert to your dates to Unix Time stamp, compare them and you have your result. The code will look something li
Read MoreSome times we need the IP address of website visitors to fined the visitors locations, spam validation and for some other reasons. So, you can get the
Read More