I wonder how many people get what's going on here at first glance! In short, this code is using arrays instead of if statements to determine exactly what to print.
For the moment we will ignore the top line:
$p = &$_POST;
..and skip to this line (and explain it):
$B = "<b>"; $B = "</b>";
First thing to note is that this is really two lines of code. PHP doesn't care about what your code looks like. The only thing that is important to PHP is that you have a ; after a valid bit of code. So lets split this once again to this:
$B = "<b>";
What is happening is that a new multi-dimensional array is being created (on the fly) with the value of <b> in the index of ;
The operator  (after a variable name) does the following:
If no array exists of that name then it creates a new one with index element of 
If an array exists of that name then it adds a new element to the end of the array with index of [last index+1]
It is also interesting (and very useful to know) that you can create completely arbitrary arrays on the fly, be they multi-dimensional or not. For example:
One final note about this method: I did this $p = &$_POST; so that I could access the post variables with the name $p. It makes the code much shorter (and less effort) to type.
So the big question. Is this array way better than the if statement way? Personally I donít think it is in this instance. Never the less, I do find myself using this technique from time to time. It is most valuable when there are many options that need to be chopped and changed. A more useful example would be if you had complex chat formatting needs like so:
// On the form emotion is a drop down with values 1 - 3 $emotion = array ( "shouts!", "screams!", "yells!", );
// On the form colour is a drop down with values 1 - 3 $color = ( "#000000", "#111111", "#222222" );
If you did the same thing with if statements there would be a lot more code.
You may ask "Why don't you just put the emotions and colours in the HTML drop downs? Then you wouldn't need the arrays in the first place!"
The reason is because if I was inserting this chat into a database (as you do with chat engines) then people would be able to put mySQL into the chat form and potentially perform SQL injection attacks. This way I know that I am expecting the values 1, 2 or 3 and there is no chance of an injection because the logic is totally abstracted from the database insert.
Right. Onward to the next solution for the same problem (i.e. evaluating bold, italic etc.).