I don't have much experience with a specific coding style for PHP code. 

But I have been adopting the following rules as a guideline for variables in
the pbcs code.

local variable are to be in lower case and connected by underscores like it
is the C-style. example:  $this_is_a_local_variable

All variables coming from Forms are to be with the first letters of words as
capitals. They should be connected without underscores. 
Example: $ThisIsAFormVariable

So in most cases you can see if a variable is used locally or if it comes
from a form.

For supportive functions I used the lower case with underscore style. For
normal functions I use Java Style ie. first word is in lowercase, then the
following worst start with a capital. Underscores are not used here.

-- Just to give an example piece of code.

// This function is called supportive because it is a sorting function
// that we made ourselves, but supports other functions. As a rough guideline
// we could say that if it doesn't output information to the user it is a
// supportive function.
function sort_array( $a , $b ) {
	if( $a[0] > $b[0] ) return  1;
	if( $a[0] < $b[0] ) return -1;
	return 0;
}

// This is a function that draws a day overview for the user.
// As you can see in this function contains a capitalized argument
// but that is mainly because the SID (Session ID) is so important and plays
// a central role thoughout the PbCs code.
function drawDayOverview( $SID ) {

	$appointments = // Database query for the appointments comes here

	// here we call the supportive function we created ourselves.
	$apps = sort_array( $appointments[0] , $appointments[1]);

	// lowercase and underscored variables are to be used here
	for( $appointment_index = 0 ; $appointment_index < $MAX_VALUE ;
		$appointment_index++ ) {

		// Here we check if the Surname that was passed by a form
		// is the same as the appointments second index variable
		if( $appointments[2] == $Surname ) {
			print "You had the following appointment: ";
			// show more!
		}
	}

}

-- End of example

Needless to say is that the above piece of code is completely bogus and
useless. Nevertheless it shows the coding style that I want to use in the
PbCs code.

For now I have not managed to go through all code and apply this coding
style, but for all now pieces of code I do want to stick to that style.



