Cool Aaron! Thanks for showing me that. I honestly could have used that
in a project several months ago. I was struggling to find a way to do
what I wanted. The syntax you posted is nice and straight forward. If I
were teaching myself php, it would have required that I knew to look for
the explode function. I get the reason for the naming of it now, but at
first glance I didn't understand it. CF on the other hand (imh, of
course) the functions are fairly self-explanitory.
I will no doubt have to code a php project again in the future. Just
from this discussion, I've learned a few things. But I'd still vote for
CF even if it's just because of my level of comfort with it. :o)
Cheers,
Chris
<cfloop index="i" from ="1" to="#ListLen(str, '*')#">
<cfset str2 = ListGetAt(str, i, "*")>
<cfloop index="n" from="1" to="#ListLen(str2, '|')#">
<cfset str3 = ListGetAt(str2, n, "*")>
<cfloop index="j" from="1" to="#ListLen(str3)#">
<!--- do some stuff with the innermost elements of
the list --->
</cfloop>
</cfloop>
</cfloop>
Can you do that in php?
$str = "a,b,c,d|d,e,f,g*h,i,j,k|l,m,n,o";
foreach(explode("*", $str) as $half) {
foreach(explode("|", $half) as $quarter) {
foreach(explode(",", $quarter) as $letter) {
// Do something unbelivably cool
}
}
}
------------------------------------------------------------------------
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.430 / Virus Database: 268.14.11/543 - Release Date: 11/20/2006
9:20 PM
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/