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-662f1c95e316a201986750/] or use file modification…

5 years ago

Current Site URL – Codeigniter

To get host url of current server simply replace application\config\config.php [crayon-662f1c95e37f0774925082/] with [crayon-662f1c95e37f7463158264/]  

5 years ago

PHP: fopen error handling

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

5 years ago

Random String PHP

[crayon-662f1c95e3aba853522112/] Output the random string with the call below: [crayon-662f1c95e3ac0221885499/]  

5 years ago

PHP function to make slug (URL string)

Note: from WordPress Use it like this: [crayon-662f1c95e3c79279146994/] Code: [crayon-662f1c95e3c7f803136506/]  

5 years ago

Include all files with in the folder

[crayon-662f1c95e3de4473927970/]  

6 years ago

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

[crayon-662f1c95e3f12303935600/] or [crayon-662f1c95e3f17454288805/]  

6 years ago

Print all value of an array – Smarty

[crayon-662f1c95e4040000608030/]

6 years ago

Receive JSON POST with PHP

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

6 years ago

Adding divs to a foreach loop every 4 times

The output look like: [crayon-662f1c95e42ee941396989/]     [crayon-662f1c95e42f3463193934/]

6 years ago