Get post ID for use in PHP

I’ve got most coding for my little hack done, but I am unable to retrieve the post ID for use in PHP. For a hack I am macking I really need to be able to parse the post ID as a variable.
I am using the following to get the post:

Is there some way I can get the post ID? The_ID echoes the ID number, but I need to use it as a variable. I am unable to find anything in the support forum or the codex. Any help would really be appreaciated!
Thanks in advance!

Oh God, I’m so stupid! I checked my code and I never noticed I accidentaly wrote $post=>ID (notice the equals sign).
Now I’ve been spamming the support forum because I was an idiot. Sorry and thank you!