Can anyone help me with a PHP class thing?
I'd like to loop through the properties in a class -- automatically. Sort of like a foreach -- is that possible?
Anya ,'Dirty Girls'
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!
Can anyone help me with a PHP class thing?
I'd like to loop through the properties in a class -- automatically. Sort of like a foreach -- is that possible?
In case anyone's in the market, Apple.com has several refurbished iPod Mini's available for $169 here.
ita, I've never used classes in PHP, but they're discussed by a user here on the foreach page (search for 'scott at slerman dot net'):
HTH
Thanks, Eddie. But that user is paging through arrays of objects in user-defined classes -- I want to page through the properties in one given object.
ita, this?
// Using PHP 5's handy new reflection API $class = new ReflectionClass('DO_User');// Get all of DO_User's variable (or property) names $properties = $class->getProperties(); // Loop through the properties for ($i = 0; $i < count($properties); $i++) { $name = $properties[$i]->getName(); if ($this->$name != '') { // Add this to the where clause $where[] = "`" . $name . "`='" . mysql_escape_string($this->$name) . "'"; } }
Figures. PHP 5. Yeah, I'm using 4.something. I'll just hard code it for now. But thanks!
Anybody used the latest version of Final Cut Express? Can it edit movies (avis, Quicktime movs, et cetera) without going through the super-long import process that iMovie goes through, or does it do the same conversion to DV before starting?
I'm probably gonna buy it either way, I just wish there was a program that had high-quality editing features built on top of the format-combining power of Quicktime Pro. Only with, you know, visual representation of multiple tracks, and transitions, and cool effects, and whatnot. As it is, I have to edit clips down to a reasonable size in QT Pro, save them, then import the small clips into iMovie to have any reasonable speed in motion from my source to my final.
Sorry if this is rambly. I really should've gone to bed hours ago.
EDIT: They upped the iMac speeds. Kinda want. About eighteen months ago I actually ordered a Powermac with specs very similar to the lowest model, and noticably lesser than the mid-range, for $2500 without monitor. I got lucky, and they released dual-processor 1.8s the next day and upgraded me for free, or else I might be real sad at the incredible difference.
EDIT 2: For that matter, how is the single-1.8 GHz PowerMac anything but an absolutely retarded deal? You can get a prettier, lighter computer, with better video, a better processor, and more hard disk space, for exactly the same price in this new iMac line!
Firefox has for no apparent reason decided to stop working on this machine. It opens, and says "Welcome to Gmail" in the title bar, but has no tabs, and nothing in any toolbar is responding to mouse clicks.
I've uninstalled and reinstalled it twice (once from the installer on my desktop, once from a fresh one at mozilla.org), and restarted my computer each time.
Any ideas?
Jessica, I found this:
How do I troubleshoot other problems?
If you encounter strange problems relating to bookmarks, downloads, window placement, toolbars, history, or other settings, it is recommended that you try creating a new profile and attempting to reproduce the problem before filing bugs. To create a new profile, see the Manage Profiles How-To. Migrate your settings files (Bookmarks, Saved Passwords, etc) over one by one, checking each time to see if the problems resurface. If you do find a particular profile data file is causing a problem, file a bug and attach the file.
Thanks, I'll try that when I get home tonight.