/usr/share/IlohaMail/include/array2php.inc is in ilohamail 0.8.14-0rc3sid6.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | <?php
/////////////////////////////////////////////////////////
//
// include/array2php.inc
//
// (C)Copyright 2000-2002 Ryo Chijiiwa <Ryo@IlohaMail.org>
//
// This file is part of IlohaMail. IlohaMail is free software released
// under the GPL license. See enclosed file COPYING for details, or
// see http://www.fsf.org/copyleft/gpl.html
//
/////////////////////////////////////////////////////////
/********************************************************
FUNCTION: Array2PHP
PURPOSE:
Given an array, generate equivalent PHP code that
will return the same array.
PRE-CONDITION:
$a - Array
$varname - Variable name to use in generated code
POST-CONDITION:
string - PHP code equivalent to array. Does not
include '<?php' tags.
********************************************************/
function Array2PHP($a,$varname){
$str.="\$".$varname."=array(\n";
$i=0;
reset($a);
while (list($key, $value) = each ($a)) {
$str.=($i>0?",":"")."\"".$key."\"=>\"".$value."\"\n";
$i++;
}
$str.=");\n";
return $str;
}
?>
|