定制 misbah/money-in-words 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

misbah/money-in-words

Composer 安装命令:

composer require misbah/money-in-words

包简介

Converts Money or Number into Words according to Bangladeshi Convention

README 文档

README

This package converts Money or Number into Words according to Bangladeshi Convention

Installation

use composer require misbah/money-in-words to install

Usage

Convert a number & get the result as an array

The 0th index will contain the word representation of the integer part & the 1st index will contain the word representing the fraction part


<?php
  
  require './vendor/autoload.php';

  $converter = new \MoneyInwords\MoneyInWords();

  $number = 1.03;

  print_r($converter->numberToWords($number));
  echo "<br>";

  $number = 0.1;
  print_r($converter->numberToWords($number));
  echo "<br>";

  $number = 3125639562;
  var_dump($converter->numberToWords($number));

/* Outputs
Array ( [0] => one [1] => three ) 
Array ( [0] => twelve crore sixty five lac forty three thousand nine hundred and eighty one [1] => ten ) 
array(2) { [0]=> string(12) "ten thousand" [1]=> string(0) "" }
*/

Convert a number into words as Bangladeshi Money

This function will return a string containing the Words in Money


<?php
  
  require './vendor/autoload.php';

  $converter = new \MoneyInwords\MoneyInWords();

  $number = 1.03;
  print_r(ucwords($converter->moneyToWords($number)));
  echo "<br>";

  $number = 0.1;
  print_r(ucwords($converter->moneyToWords($number)));
  echo "<br>";

  $number = 3125639562;
  print_r(ucwords($converter->moneyToWords($number)));


/* Outputs
One Taka And Three Paisa
Zero Taka And Ten Paisa
Three Hundred And Twelve Crore Fifty Six Lac Thirty Nine Thousand Five Hundred And Sixty Two Taka
*/

统计信息

  • 总下载量: 24
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-03-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固