Snippets

Clear the browser cache of CSS or JavaScript Using PHP

Other than caching every hour, or every week, you may cache according to file data. [crayon-679fd596cceda410096423/] or use file modification…

6 years ago

Current Site URL – Codeigniter

To get host url of current server simply replace application\config\config.php [crayon-679fd596cd288389239135/] with [crayon-679fd596cd28d638995265/]  

6 years ago

PHP: fopen error handling

You should first test the existence of a file by file_exists(). [crayon-679fd596cd3a4372028021/] or simple solution without exceptions: [crayon-679fd596cd3a7475376294/]  

6 years ago

Random String PHP

[crayon-679fd596cd456311658693/] Output the random string with the call below: [crayon-679fd596cd458845505358/]  

6 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-679fd596cd4f6879919730/] Code: [crayon-679fd596cd4f8224427041/]  

6 years ago

Include all files with in the folder

[crayon-679fd596cd616016241676/]  

6 years ago

How can I remove 3 characters at the end of a string in php?

[crayon-679fd596cd6ad596078376/] or [crayon-679fd596cd6af587526898/]  

7 years ago

Print all value of an array – Smarty

[crayon-679fd596cd74e092226910/]

7 years ago

Receive JSON POST with PHP

[crayon-679fd596cd7cd972402788/] instead of [crayon-679fd596cd7cf727209752/] It will give you POST data as is. You will be able to decode it using…

7 years ago

Adding divs to a foreach loop every 4 times

The output look like: [crayon-679fd596cd86c425527887/]     [crayon-679fd596cd86e667575969/]

7 years ago