I believe your code just needs the CP value to contain quotes. For simplicity, I used single quotes for the outer string and double quotes for the value passed back in the header.
header( 'P3P: CP="NON DSP LAW CUR ADM DEV TAI PSA PSD HIS OUR DEL IND UNI PUR COM NAV INT DEM CNT STA POL HEA PRE LOC IVD SAM IVA OTC"' );