You are here

function _invoice_getvars_string_to_array in Invoice 6

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

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

Parameters

unknown_type $s_vars:

Return value

unknown

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 536
Invoice module

Code

function _invoice_getvars_string_to_array($s_vars) {
  $exp = explode('&', $s_vars);
  $a_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]);
    $a_query_vars[$sub_exp[0]] = $sub_exp[1];
  }
  return $a_query_vars;
}