no problem there are a select few here who would help you out a lot if you ask right and actually try to learn yourself also.
If you have a project in mind post about it and post your progress this way we know your intentions are for help not just someone to do it all for you.
pommie code is correct but there are more efficiant ways like define the port pin this way if it needs to be changed you only need to change one line and all will follow:
Code:
#define myButton PORTAbits.RA0
.....
//now you can use
if(myButton == 1){
//button pressed do something
}
Note: the above code assumes the button is pulled down meaning a resistor is connected to GND.
If your button is pulled high then use the below code:
Code:
#define myButton PORTAbits.RA0
.....
//now you can use
if(myButton == 0){
//button pressed do something
}