I recommend
Codecademy for learning php. It's completely free, you don't even have to sign up (doing so will only help you save your progress).
Basically, for this to work, you need to override how adoptables are being displayed. You'll need to save a separate file for each pet, probably by id. You'd want to look into creating a function inside classes/class_ownedadoptables.php to point to the file relevant to the pet's id and display it. Then you'll need to search through all the files (hint - get an IDE text editor that will allow you to search entire folders file contents) for every instance getImageURL() in regards to the pets displaying and replace it with a call instead to the function you made that points to the pet's file. (Whether that's an image or a swf, whatever?)
As for actually incorporating dress up items, making sure the user owns the items and that they're equipped properly and so forth... I don't know. I haven't done that myself. If you're doing it all with swf flash files, you'll definitely need ajax and understanding of how php can communicate to the swf file and back, because both directions of communication will be necessary.