NZ_Kiwis wrote:how to encrypt this information?
I think your best bet is to sub-contract a PHP developer who is professionally well versed in integrating crypto. Attempting this yourself when you are currently clueless sounds like a recipe for disaster.
That said, if you have no other option but to do this yourself, then searching the Web for a library that can correctly abstract away the details for you may be the next best option, assuming that you can trust whatever you find.
Otherwise, I suspect that you are left with using the mcrypt and openssl extensions. The mcrypt extension can be used to encrypt the credit card details, e.g., with AES using MCRYPT_RIJNDAEL_256; the openssl extension can be used to generate the key and IV for the symmetric key encryption and for the public key encryption of that key generated. (You can also use it alone, but it seems to me that you are more likely to use mcrypt correctly for the symmetric key encryption.) You also have to consider that you will need to sign the data to detect tampering.
EDIT:
Oh, I noticed that in another thread you asked about "developing secure pages". Indeed, even if you get an expert to design and implement this correctly for you, it will still be insecure if the credit card details coming to the server from the customer are not securely sent through SSL/TLS or an equivalent.