PHP code example of cybersai / ussd-store

1. Go to this page and download the library: Download cybersai/ussd-store 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/ */

    

cybersai / ussd-store example snippets




use Cybersai\UssdStore\UssdStore;

$store = UssdStore(['name' => 'Ussd App']); // Can initialized it with options data
$store(['phone' => '0545123456']); // Can set data by invoking with array
$store->account_number = '03011231231321'; // can set data using dynamic properties
$store->set('user_type', 'registered'); // can set data explicitlly

echo $store->get('name'); // can retrieve data with one of the few available methods
print_r($store->toArray()); // get all data as array key-value pair