本文介绍了ColdFusion的了,如何将字符串转换为数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于以下字符串中的ColdFusion:
Given the following string in ColdFusion:
ul[0][id]=main1 &ul[0][children][0][id]=child2 &ul[0][children][0][class]= &ul[1][id]=main3 &ul[2][id]=main4 &ul[3][id]=main5
我怎样才能创建一个数组与上面的信息?
How can I create an array with the info above?
感谢
推荐答案
。这一点是我们在我们做调度员,它是相当复杂的。看看我们是如何做的呢,看看调度code:
from looking at the string it appears that what you're trying to do is convert a url querystring to an array of structures. this is something that we've done in cfwheels in our dispatcher and it's quite complex. to see how we're doing it, take a look at the dispatcher code:
的
看的方法是:
$的CreateParams()
$createParams()
$ getParameterMap()
$getParameterMap()
$ createNestedParamStruct()
$createNestedParamStruct()
$ createNewArrayStruct()
$createNewArrayStruct()
这篇关于ColdFusion的了,如何将字符串转换为数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!