My iBook was the start of my Mac love. As Hec can attest to, I've since been totally sucked into the Cult of Mac.
Buffistechnology 2: You Made Her So She Growls?
Got a question about technology? Ask it here. Discussion of hardware, software, TiVos, multi-region DVDs, Windows, Macs, LINUX, hand-helds, iPods, anything tech related. Better than any helpdesk!
I've since been totally sucked into the Cult of Mac.
Oh, yes. I've always loved Macs -- they were the first computer I used, way the hell back in the 80s. We used them for the newspaper in college, and then my first job out of college I suffered through using a 486 (hey, it was 1994 -- 486s were still not too shabby). But they fired me after 18 months, and the next job I got is the job I have now, which is Mac city. LOVE.
I'd like to loop through the properties in a class -- automatically. Sort of like a foreach -- is that possible?
ita, Still trying to do this?
I coded around it, but am interested in knowing if it can be done in 4.x.
It looks like get_object_vars will do what you want for you in either PHP 4.2 or 5. Before 4.2, not so much, as unset object properties aren't reported.
Kewl. Thanks.
Thanks, Tom. Problem solved.
I don't know if anyone will know this but... I'm working with xml and xsl, using JavaScript. I have a param in the xsl called "parSelected", and I've proven that I can pass values to it from JavaScript. Now I want to have something in the xsl that compared the value of the param to something in the xml. Something like this:
<xsl:when test="@n = " + <xsl:value-of select="$parSelected" />>
But not the same as that, as that doesn't work. Apparantly is is not valid xsl.
I also don't know if the '+' is correct to concatenate....
You have to use the concat() function.
Thanks, Tom.
But on further research on the internets, it seems I can't construct the test string on-the-fly, so some other solution not involving concatenation of this type may be required.
Going home now....
eta: I am an idiot. At first I thought it would be something simple like:
<xsl:when test="@n = $parSelected">
but that didn't work. Turns out I was passing the wrong variable into $parSelected. I wasted three hours yesterday because of this. OTOH, it's nice how a night's sleep can improve one's perspective.