FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


How tough is PHP?





rameshbn1
Hello People,

I just got started in PHP. I just wrote the <? print "Hello World"; ?> and it worked. This was a thril because I spent two days figuring out how to configure Apache 2 and PHP 5 on my PC. So I woke up the neighbours with a loud yell.

I'm already an amateur programmer, with 'a little' of c++ and c# under my belt. Let's assume that I've got the average guy's IQ.

So, according to you experts,


    How long will I take to become competent in PHP by trial and error? I already have Gilmore's book with me.
    What other books would you recommend?
    What are the topics you would advise me to concentrate on?
    Is it possible/feasible to do desktop programming in php?

Tac-Tics
rameshbn1 wrote:

    How long will I take to become competent in PHP by trial and error? I already have Gilmore's book with me.
    What other books would you recommend?
    What are the topics you would advise me to concentrate on?
    Is it possible/feasible to do desktop programming in php?


There is no boolean value of whether you are competent or not. In PHP, it's good to know:

1. How to output text. (You already know how to do this).
2. Read and write to a database. (Look at PHP's mysql documentation).
3. How to put together an HTML form.
4. Read and write to and from $_REQUEST variables (Look at PHP's documentation for $_REQUEST, $_GET, and $_POST)

If you want to get fancy, there are other more advanced things like sessions and cookies.

Learning by trial and error will get you no where. Instead, try learning by trial, error, google, and documentation. You will get much further Wink Especially with PHP, there is no book that comes close to the greatness you will find on the web. The PHP documentation is excellent and will slowly teach you many of PHP's odd habits (magic quotes comes to mind).

While PHP is great for throwing together web scripts, it falls short for anything else. The interpreter has a default Timeout of 60 seconds... meaning if you don't finish what you're doing in under a minute, it cuts you off. For painless desktop development, look into Python. The syntax is much cleaner than PHP and it is just as powerful and compact.
rameshbn1
Great reply, thanks!

I was thinking about making a forum for my website. How good at php do you have to be for this? I now know I need to learn mysql, html forms and finer points of output.

Is there a place on the web which will teach me to make forums?


Rolling Eyes
Tac-Tics
rameshbn1 wrote:
I was thinking about making a forum for my website. How good at php do you have to be for this? I now know I need to learn mysql, html forms and finer points of output.


Personally, I think the HTML part is harder. HTML is like a mutating gorilla that keeps growing more and more arms every year. You have to accomodate for IE, fight with CSS layouts, produce nice looking graphics, and put together a nice layout for your page.

Making a forum is not an easy thing. I could probably throw together something that looked like a forum in about a day, but if you want nice features and a nice layout, it could be a year long project.

Start by looking at phpBB. phpBB is insanely easy to install (it just requires php and mysql), and it is a quality, free product. You're using it right now.

If you just started PHP, I don't know if a forum is a good place to start learning.
izcool
To me, the small bit of PHP that you wrote is a little bit "weak". (No offense intended). Here's how I would go about with the same sort of command :

Code:
<?php
echo"Hello World";
?>


The reason why I say it's weak because I like to start out with the "stronger" brackets (the <?php instead of the <?) and separate some of it up with blank lines. To me it looks a little easier to read and to notice that it's a PHP statement.

Echo is a simillar command to "print" and I use "echo" more often. There is a difference with it but I'm not going to bother look it up.

I would recommend you to get very friendly and familliar with the extensive documentation on PHP.net. Use the search tool on the upper right hand part of the site to search for what a command means. For example, one that you should learn is called "strtolower". From me using it a lot, it's short for "String to lowercase" (which is in simple terms, a way for you to take a bit of text and make it all lowercase). Example :

Code:
<?php
$bitoftext = "I aM sO aWeSoMe";

echo strtolower($bitoftext);

// It should have outputted "i am so awesome" //
?>


Just wait until you get into the really complicated stuff. I've made several websites out of PHP and it works wonders with MySQL.

Here's one script that I done in PHP/MySQL that's actually a DiscussionBoards page. (You can see it in action at http://vb.izcool.be/discussionboards.php - but you'll have to register for an account and login to see it working).

http://vb.izcool.be/files/discussionboards.phps

That DiscussionBoards page took me about a week to program, and it works BEAUTIFULLY. I love the way I did it, and the time that I put into it to make it work just right. I was using this as an example since you asked how long it would take to make one. That's how long it took me to do that one.

It's good that you're expanding into more and more programming languages. I've been told that it's one of the easist to learn, but it can be complicated sometimes when there's a problem. Most of the time, I've forgotten to add a { or a } in the code, which is a real hassle trying to find, especaially in longer scripts, like my DiscussionBoards page.

- Mike.
rameshbn1
Quote:
The reason why I say it's weak because I like to start out with the "stronger" brackets (the <?php instead of the <?) and separate some of it up with blank lines. To me it looks a little easier to read and to notice that it's a PHP statement.

Yes, I understand. Good point.
Quote:
Making a forum is not an easy thing. I could probably throw together something that looked like a forum in about a day, but if you want nice features and a nice layout, it could be a year long project.


Good point again. Ok, I'll be more modest in my ambitions Smile
izcool
That's OK, you still have a lot to learn.

One oddball thing about PHP that I learned is that <?="Hello World";?> actually works. It's a bit of an odd command since there's nothing really related to it, but it does work. Smile Something to take a look at. My guess is this on how it would work :

Code:
<?php
$variable = "Hello World";
?>


... Later on down the page ...

Code:
<?=$variable;?>


BTW, you're more than welcome to take a look at the code that I posted for the Forums (I like to call mine DiscussionBoards since they really deserve that fancy and sophisticated name Smile) to see what commands I had used.

Anyway, if you have any questions, feel free to ask.

- Mike.
rameshbn1
Thanks Mike
Thanks Tac-Tics

You guys are really wonderful.
Smile

Mike, I have to warn you - I'll have a lot of doubts! Wink
hellrahul
Hey DUDE.

As I think PHP is not a Hard language.

I learnt Php in 15 days. And I\m able to write scripts very easily.

If you Know C++ then Php is just change in syntax.

About Forum :
Creating Any web site or Forum merely needs any php knowledge.
You have to firstly design the database structure (in copy). And map the flow of controll. If designing is done then you can easily write a Php script for it.

Its Like Translation. You want to write a essay. Then you should have the idea in mind. Then you can write it in the copy in any language you know.

But sound knowledge of language is also necessary.
You should learn use of most of the inbuilt function. And I reccomend you to download and read official php manual.
Atishay
PHP is a piece of cake for anyone who knows atleast one language other than HTML ........ I learned PHP in 4-5 hours.

It just needs to be 1>2>3>4>5 and not 3>5<1>2>4

I hope you got my point.

Thanks
Atishay
------------------------------------------------------------------------------------
Visit the Finestwebs Giveaway to grab free softwares, Scripts, Hosting and much more @ http://www.finestwebs.com
henrygl
no offense peeps but making a forum is so easy

just install phpbb2!!! Laughing
Tac-Tics
tac-tics wrote:
Start by looking at phpBB. phpBB is insanely easy to install (it just requires php and mysql), and it is a quality, free product. You're using it right now.
henrygl (4 days later) wrote:
no offense peeps but making a forum is so easy

just install phpbb2!!! Laughing
It's been discussed Rolling Eyes

Also, making != having. Being in possession of something is not a skill, and is thus neither easy nor difficult.
SlowWalkere
I also came to PHP after learning C++ (although it's been a few years since I used any C++). It'll definitely making learning PHP quicker. Since you already know most of the concepts behind programming (and they're pretty similar), you just need to learn the new syntax.

After a week of fiddling around, I had a pretty good grasp of the language. There's always going to be more to learn, but once you get the gist of it its just a matter of looking through the PHP documentation and putting the pieces together right. In case the book you've got isn't working, check out this online book - http://www.hudzilla.org/phpbook/index.php. I found the link on the forum here, and it was a great help. If you already know a bit about programming, you can breeze through most of the early chapters (you'll especially want to skim through the Functions chapter, to get an idea of some of the more useful built in functions). The two best chapters to read are on Databases and Sessions/Cookies. This stuff is unique to web programming, and it's generally an integral part of a site written in PHP.

Good luck,
- Walkere
bnbrown
You can have a look at http://phpforbeginners.com I learnt here the basics. PHP is very useful, but when you learn the basics it's not so easy unless you're into programming (they say c++ is quite similar to PHP)
moejoe
PHP, i believe, is the easiest online language (apart from HTML, Frontpage makes that a breeze)

And www.PHP.net is great because it has every function and variable. (use the search bar)

Unfortunately, there beginners section (what i thought) was very difficult. Stick with phpforbeginners.com

In the mean while, Stock up on HEAPS of Tutorials, Demos and download some free scripts (such as forum scripts) and learn how they work.

Best of luck.
jcvincent
izcool wrote:
To me, the small bit of PHP that you wrote is a little bit "weak". (No offense intended). Here's how I would go about with the same sort of command :

Code:
<?php
echo"Hello World";
?>


The reason why I say it's weak because I like to start out with the "stronger" brackets (the <?php instead of the <?) and separate some of it up with blank lines. To me it looks a little easier to read and to notice that it's a PHP statement.

Echo is a simillar command to "print" and I use "echo" more often. There is a difference with it but I'm not going to bother look it up.

I would recommend you to get very friendly and familliar with the extensive documentation on PHP.net. Use the search tool on the upper right hand part of the site to search for what a command means. For example, one that you should learn is called "strtolower". From me using it a lot, it's short for "String to lowercase" (which is in simple terms, a way for you to take a bit of text and make it all lowercase). Example :

Code:
<?php
$bitoftext = "I aM sO aWeSoMe";

echo strtolower($bitoftext);

// It should have outputted "i am so awesome" //
?>


Just wait until you get into the really complicated stuff. I've made several websites out of PHP and it works wonders with MySQL.

Here's one script that I done in PHP/MySQL that's actually a DiscussionBoards page. (You can see it in action at http://vb.izcool.be/discussionboards.php - but you'll have to register for an account and login to see it working).

http://vb.izcool.be/files/discussionboards.phps

That DiscussionBoards page took me about a week to program, and it works BEAUTIFULLY. I love the way I did it, and the time that I put into it to make it work just right. I was using this as an example since you asked how long it would take to make one. That's how long it took me to do that one.

It's good that you're expanding into more and more programming languages. I've been told that it's one of the easist to learn, but it can be complicated sometimes when there's a problem. Most of the time, I've forgotten to add a { or a } in the code, which is a real hassle trying to find, especaially in longer scripts, like my DiscussionBoards page.

- Mike.




Yes. I preffer starting my php script with <?php than <? alone. Anyway. its good to experiment php. However based on your topics title, PHP is not as powerful as java and c++.
SFMeatwad
I've just started learning it myself and already created an email transferrer and a login system using SQL and PHP 5.0 scripting. The login system is not complete, though, it's still in Beta.

http://www.joinuf.com/index2.php to try it out! Smile
Related topics
http://tuvanonline.com/library/index.php
PHP-Nuke platium?
PHP Write to line
Anyone good with PHP-NUKE?
PHP safety?
req: PHP to list files in directory, and link to them
php admin and mysql admin console
Mysql And PHP HELP PLZ
Great php editor
Script php about gallery
how did you learn about html, php or other languages???
convertin Html codes to javascript or php! 10 frih$ each!
How Tough is PHP - Part II
Help Building my site...
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.