GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tigoCaval/arithmetic-array-php: Using the mathematical operation between two arrays with the same key. Utilizando operação matemática entre dois arrays com a mesma chave

BranchesTags
Open more actions menu

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
ArithmeticArray.php
ArithmeticArray.php
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Arithmetic Array (PHP)

Using the mathematical operation between two arrays with the same key

Utilizando operação matemática entre dois arrays com a mesma chave

Example

include_once "ArithmeticArray.php";
$op = new ArithmeticArray();

$a = ['y'=>10,'x'=>9.50];
$b = ['y'=>3,'x'=>3];

// numeric values are rounded
print_r($op->operation($a,$b,'+')); // result = ['y'=>13 'x'=>12.5]
print_r($op->operation($a,$b,'-')); // result = ['y'=>7 'x'=>6.5]
print_r($op->operation($a,$b,'*')); // result = ['y'=>30 'x'=>28.5]
print_r($op->operation($a,$b,'/')); // result = ['y'=>3.33 'x'=>3.17]

About

Using the mathematical operation between two arrays with the same key. Utilizando operação matemática entre dois arrays com a mesma chave

github.com/tigoCaval/arithmetic-array-php

Topics

arrayarray-manipulationsarray-operationphp

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.