is Php code browser dependent

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
chitrapu
Forum Newbie
Posts: 23
Joined: Sun Jan 14, 2007 11:39 pm

is Php code browser dependent

Post by chitrapu »

hiiii,
i would like to know if php code is browser dependent
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

This forum is coded in php. Open your browser's source view for this page. Do you see any php code? No, only html/javascript, but no php code. php runs on the server, not "in" the browser.
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Post by CoderGoblin »

PHP is not browser dependant, although it can get the users browser using a command get_browser.

The php is used to build HTML pages. These HTML pages may contain javascript and should contain CSS styling. It is these things that can be browser dependant. If you are aiming for a browser you will always run into this no matter how you build your pages (no matter what language). It is nothing to do with PHP.
Post Reply