我有一个阵列。 例如:
array( a => abc , b => pqr , c => xyz );
fron this i have encoded the key c now i am getting encoded value for this key.
接下来需要将这种编码价值替换成编码钥匙的原始价值......
举例说,这种潜在产出如下:
array( a => abc , b => pqr , c =>H162);
请任何人帮助我。
我有一个阵列。 例如:
array( a => abc , b => pqr , c => xyz );
fron this i have encoded the key c now i am getting encoded value for this key.
接下来需要将这种编码价值替换成编码钥匙的原始价值......
举例说,这种潜在产出如下:
array( a => abc , b => pqr , c =>H162);
请任何人帮助我。
只是给阵列的要素c分配价值。 e.g.
$arr = array( a => abc , b => pqr , c => xyz );
print_r($arr);
$arr[ c ] = H162 ;
print_r($arr);
阵列——一个或多个阵列
我认为,这是你努力做到的:
$array1 = array( a => abc , b => pqr , c => xyz );
$array2 = array( xyz => test );
foreach($array1 as $key=>$element){
if(array_key_exists($element, $array2)){
$array1[$key] = $array2[$element];
}
}
非常宽泛的问题。 我举了一个有数字的例子,有几种编码/编码方法。
第一,界定你的编码/编码功能。 (说明:在这一例子中,一) 工作数量积极。 你可以写上你自己的扼杀方法。 当你查阅你的物品时,你必须始终知道价值是否编码,因此,我们总是代表编码编号为负数,而我们假设的是负数。 (如用“0”和“1”等编码的插图,可以预示正常方位。) 还有其他方法。
//Very simple functions, should be complex functions.
function encode($x) { return - $x * 2; }
function decode($x) { return - $x / 2; }
现在想象着一个阵列:
$arr = array( a =>123, b =>456, c =>789);
编号:
$arr[ c ] = encode($arr[ c ]);
......或将所有项目列入贵国的表格:
foreach($arr as $key=>$val)
$arr[$key] = encode($arr[$key]);
进入阵列成员:
function getArrayMember($key)
{
if ($arr[$key] < 0) //This is an encoded number...
return decode($arr[$key]); //...decode it.
else //Normal numbers...
return $arr[$key]; //...return as is.
}
这个数字是多少。 你们可以实施或找到合适的扼杀/dec方法。
I m using Java to parse this request http://ajax.googleapis.com/ajax/services/search/web?start=0&rsz=large&v=1.0&q=rz+img+news+recordid+border which has as a result this (truncated for ...
I m not talking about reading in the file content in utf-8 or non-utf-8 encoding and stuff. It s about file names. Usually I save my Perl script in the system default encoding, "GB2312" in my case and ...
Can anyone teach me how to use mojarra to encode my JSF files. I downloaded mojarra and expected some kind of jar but what i had downloaded was a folder of files i don t know what to do with
How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks
I am using a Java library called PDFBox trying to write text to a PDF. It works perfect for English text, but when i tried to write Russian text inside the PDF the letters appeared so strange. It ...
Generally we are using UTF-8 encoding standard for sending the request for every language. But in some language this encoding standard is not working properly,then in that case we are using ISO-8859-1....
Does window.location.hash contain the encoded or decoded representation of the url part? When I open the same url (http://localhost/something/#%C3%BC where %C3%BCtranslates to ü) in Firefox 3.5 and ...
As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...