What do you want to save?
Add Code snippet
New code examples in category PHP
-
-
Rami 2021-08-28 22:21:02
Woocommerce custom Flat Rate charges (by ID) Function
function wc_ninja_change_flat_rates_cost( $rates, $package ) { // Make sure flat rate is available // '13' is Flat Rate ID (What you Define) if ( isset( $rates['flat_rate:13'] ) ) { // Set the cost to $100 $rates['flat_rate:13']->cost = 60; ... Add solution -
Sara_Elaine 2021-08-28 18:22:01
sort names alphabetically php
<?php $fruits = array("lemon", "orange", "banana", "apple"); sort($fruits); foreach ($fruits as $key => $val) { echo $val; ... Add solution -
Hasan Ali Khan 2021-08-28 16:50:02
encrypt xampp
1-First, you should download the suitable version for your system from here: https://pecl.php.net/package/mcrypt/1.0.3/windows 2-Later, you should copy php_mcrypt.dll under ../xampp/php/ext/ 3-you should enable extension like extension=mcrypt from xampp... Add solution -
Joshua Nazar 2021-08-28 14:35:01
create and download text file in php
$file = "test.txt"; $txt = fopen($file, "w") or die("Unable to open file!"); fwrite($txt, "lorem ipsum"); fclose($txt); header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filenam... Add solution -
Alessia fabbioni 2021-08-28 12:17:01
shopware create plugin
./bin/console plugin:create MyPlugin Add solution