Sign up ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have seen lots of questions about this topic and all of them were asking whether someone, who wants to use PHP for "building web pages", should learn HTML first, or not?

Most of the answers said yes, because most of the time you make web page with both PHP and HTML (and maybe CSS).

However, if I just want to use PHP for contacting to My Database (for example MySQL) and nothing more, should I first learn any HTML or CSS, or not?

share|improve this question

closed as primarily opinion-based by Simon Hayter Jun 12 '14 at 8:44

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

If you only want to interact on the command line you do not even need PHP. You can talk to your database directly and use a few shell functions (e.g. bash on Linux, Powershell on Windows etc.) to format and store the data. –  Eike Pierstorff Jun 12 '14 at 8:30
not just that. actually I want to communicate from my android application to my mysql database, and php is going to do that for me I guess. –  Sadegh Jun 12 '14 at 8:51

2 Answers 2

up vote 1 down vote accepted

You can learn PHP without learning HTML / CSS.

If you are just doing simple database operations without making any web pages / web interface to your application, then PHP only is fine. So, you would be practically restricted to running PHP scripts via command line.

share|improve this answer

It's never bad to know the basics of HTML/CSS, but if you really just use it for database communication, I don't really see the need to learn it.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.