PHP数组到C# [英] PHP Array to C#
本文介绍了PHP数组到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我正在尝试将PHP数组转换"为C#.
这是PHP Array
Hello,
I am trying to "convert" a PHP Array to C#.
This is the PHP Array
while ($aRow = $oRes->fetchAssoc())
{
if (!isset($aUsers[$aRow['movie_id']]))
{
$aMovies[$aRow['movie_id']] = array(
'movie_id' => $aRow['movie_id'],
'movie_title' => $aRow['movie_title'],
);
}
if (!empty($aRow['genre_id']))
{
$aMovies[$aRow['movie_id']]['movie_genre'][$aRow['genre_id']] = array(
'genre_id' => $aRow['genre_id'],
'genre_name' => $aRow['genre_name']
);
}
}
我不知道该如何处理,我尝试使用数组和列表(甚至是字典),但我无法弄清楚.
任何帮助将不胜感激.
I dont know how i should handle this, I tried using array''s and list''s (even Dictionary) but i cant figure it out.
any help will be appreciated.
推荐答案
aRow =
oRes-> fetchAssoc()) { 如果(!isset(
oRes->fetchAssoc()) { if (!isset(
aUsers
这篇关于PHP数组到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文