You are here

function barcode_ean_max_length in Barcode 6.2

Same name and namespace in other branches
  1. 7.2 plugins/ean.inc \barcode_ean_max_length()

@file Barcode plugin EAN-13: Used with consumer products internationally, 13 characters UPC-A: Used with consumer products in U.S., 12 characters ISBN: Used to mark books, 13 characters

File

plugins/ean.inc, line 11
Barcode plugin EAN-13: Used with consumer products internationally, 13 characters UPC-A: Used with consumer products in U.S., 12 characters ISBN: Used to mark books, 13 characters

Code

function barcode_ean_max_length($encoding) {
  if ($encoding == 'UPC-A') {
    return 12;
  }
  elseif ($encoding == 'EAN-13' || $encoding == 'ISBN') {
    return 13;
  }
}