PHP code example of passionator / basket
1. Go to this page and download the library: Download passionator/basket library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
passionator / basket example snippets
use Passionator\Basket\BasketClass;
$basket = new BasketClass();
// You can add among of ['R01','G01','B01']
$basket->add('B01');
$basket->add('R01');
$basket->add('G01');
// you can calculate the total price
echo $basket->total();