This will unlikely to be something we can fix in a PHP forum.
Look at the HTML source code, that is coming from the server. PHP will be playing its part in sending that HTML stream of data FROM the server.
That the HTML stream does not play together nicely with JS/CSS is not a PHP problem.
The way to solve this is normally to save the HTML source code, (maybe format it a bit too so that it is readable) and the dependent JS/CSS/resource files in a folder. Isolate the display problem and try and get it fixed.
Find the fix and then go back and check what generated the HTML source code.
It is rarely the fault of PHP though.