[I edit to add best practice, following Dotancohen suggestion in his answer. I hope it doesn't make it less clear, and that the good habit is taken]
Important additional information: They are not equivalent.
chmod a+rwx : set the last 3 octals to 777, so it ensure that Owner, Group and Users have the "rwx" set. If there was aditionnal bits in the first octal (setuid, setgid, and/or Sticky bit) it leaves them untouched. Think about it as a binary "or 00777".
chmod 777 : set the rights to 00777, so it ensure Owner, Group and Users have "rwx" set, AND NOTHING MORE. It also make sure the additional bits (setuid, setgid, and/or Sticky bit) are set to 0.
So use the first form, if you just want to make sure to grant access to everyone (and please make double, triple sure that it is required... it opens the door to all sort of security problems, some quite unexpectedly broad in what they allow a malicious user to do)
Use the 777 form if you also want to make sure to reset any setuid/setgid/sticky bit, ie if the files needs to be "00777", which is probably more likely in your case (the file's right is known, and should be : 00777). Here also, make triple sure that it is really needed...
Usually it's best to keep access to owner(and sometimes group) : then use the groups to grant access to some specific users to the file/directory. a+rwx is both easy and usually the wrong way to grant access (of course there are very rare cases when it is the only way...)
http://en.wikipedia.org/wiki/Chmod is a good read as it explains what each number or letter represents (including setuid/setgid/sticky)