phpbar.de logo

Mailinglisten-Archive

[php] string=>array

[php] string=>array

Thomas Weinert info_(at)_subjective.de
Mon, 3 Jul 2000 17:33:08 +0200


Hi

<code>
function line2hash($line,$sep1="&",$sep2="=") {
  $i_arr = false;
  $keyvals = explode($sep1,$line);
  while (list(,$keyval) = each($keyvals)) {
    list($key,$val) = explode($sep2,$keyval) {
      $i_arr[$key] = $val;
    }
  }
  return $i_arr;
}
</code>

cu
Thomas Weinert
http://www.subjective.de


php::bar PHP Wiki   -   Listenarchive