You are here

function _invoice_getvars_string_to_array in Invoice 7

Same name and namespace in other branches
  1. 6 invoice_helpers.inc \_invoice_getvars_string_to_array()

Helper function to convert the string with get variables to an array

Parameters

string $vars_string:

Return value

array

1 call to _invoice_getvars_string_to_array()
invoice_set_pay_status in ./invoice.module
Set the status of an invoice to paid

File

./invoice_helpers.inc, line 647
Invoice module

Code

function _invoice_getvars_string_to_array($vars_string) {
  $exp = explode('&', $vars_string);
  $query_vars = array();

  // the first element is always "q", we don't want that element so start with $i=1
  for ($i = 1; $i < count($exp); $i++) {
    $sub_exp = explode('=', $exp[$i]);
    $query_vars[$sub_exp[0]] = $sub_exp[1];
  }
  return $query_vars;
}