Luke4123 Posted March 10, 2008 Share Posted March 10, 2008 What do you guys think? I know HTML, CSS and started learning PHP but found it too hard so I thought I would learn Javascript. Should I? Thanks. Link to comment Share on other sites More sharing options...
Peppe L-G Posted March 10, 2008 Share Posted March 10, 2008 Well, if you have learned one language, you cant stop learning others, so the really question is if you're going to learn it now or later (: Or, so was the case with me.But I think PHP is easier to learn, cause there you got all the errors you have in your code, witch is harder to find in Javascript. And PHP i funnier then Javascript. Link to comment Share on other sites More sharing options...
aspnetguy Posted March 10, 2008 Share Posted March 10, 2008 If you gave up on PHP you are never going to survive JavaScript. JavaScript has all the same programming concetps as PHP with tonnes of cross browser issues thrown in. Link to comment Share on other sites More sharing options...
jesh Posted March 10, 2008 Share Posted March 10, 2008 If you gave up on PHP you are never going to survive JavaScript. JavaScript has all the same programming concetps as PHP with tonnes of cross browser issues thrown in.I would argue that javascript is easier being as you don't have to set up a web server and install PHP - you just write code in a text editor, save that as HTML, and load it up in a browser.Learn javascript. Link to comment Share on other sites More sharing options...
jeffman Posted March 10, 2008 Share Posted March 10, 2008 You'll probably get more satisfaction with javascript. Not because it's easier, but because you can make more things happen on the page. I mean your pages can become more interactive for the user. I suggest giving yourself some simple projects:create a text input for the user's name; and a button that put the user's name in an alert boxcreate a div that changes background color when a user clicks a buttoncreate a div that disappears or reappears when a user clicks a buttoncreate a div or image that moves to a random position when a user clicks right on ituse several text inputs and a button to create a simple interest calculatorprint today's date in small letters at the bottom of the screenetc. Link to comment Share on other sites More sharing options...
aspnetguy Posted March 10, 2008 Share Posted March 10, 2008 I would argue that javascript is easier being as you don't have to set up a web server and install PHP - you just write code in a text editor, save that as HTML, and load it up in a browser.Learn javascript.I was not including setting up a development enviroment as part of learning the language. PHP is probably the easiest server side language (not getting into too much advanced stuff).JavaScript is easy for very basic stuff but it doesn't take too long before you get into cross browser issues and understanding object scope in JS can be a bit tricky sometimes. Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 10, 2008 Share Posted March 10, 2008 I would say it depends upon why you found PHP hard. Was it hard to read? (I have a friend who hates the $s.) Or was it the theory/concepts that made it hard? And which ones? Link to comment Share on other sites More sharing options...
Luke4123 Posted March 11, 2008 Author Share Posted March 11, 2008 I would say it depends upon why you found PHP hard. Was it hard to read? (I have a friend who hates the $s.) Or was it the theory/concepts that made it hard? And which ones?Well I found it hard to understand all the different variables and didnt understand the purpose of it. Link to comment Share on other sites More sharing options...
Synook Posted March 11, 2008 Share Posted March 11, 2008 Well I found it hard to understand all the different variablesDo you mean the functions? Well, as you develop applications using PHP you will gain a greater understanding. As long as you have the basic syntax under control, go! Make something! And you will learn further didnt understand the purpose of itIt can enable your pages to display dynamic content without the need to manually edit HTML code. This forum, for example, is written in PHP - so PHP is used to allow people to login, post, and displays the threads and posts all nicely formatted in HTML. The alternative is dedicated human editors that update the pages as they come in - not a very nice job Link to comment Share on other sites More sharing options...
Luke4123 Posted March 11, 2008 Author Share Posted March 11, 2008 So can I make a forum if I learn PHP? Link to comment Share on other sites More sharing options...
aspnetguy Posted March 11, 2008 Share Posted March 11, 2008 Yes you could, it would take a while before oyu gained understanding of all the concepts, but you could. You can make just about anything you can imagine with any programming language. Link to comment Share on other sites More sharing options...
aszxcv Posted March 11, 2008 Share Posted March 11, 2008 is it best to learn php 5 or 6?i want to learn but not sure if i should wait till 6 comes out since its almost here Link to comment Share on other sites More sharing options...
justsomeguy Posted March 11, 2008 Share Posted March 11, 2008 How do you know it's almost here, have you seen any announcements that I've missed? Link to comment Share on other sites More sharing options...
aszxcv Posted March 11, 2008 Share Posted March 11, 2008 i am seeing books pop up on amazonjust asking wich would be best to learn? Link to comment Share on other sites More sharing options...
justsomeguy Posted March 11, 2008 Share Posted March 11, 2008 Well, since you can't download or install PHP 6 at this point I would say start with PHP 5. Link to comment Share on other sites More sharing options...
aszxcv Posted March 11, 2008 Share Posted March 11, 2008 thanksi am a newbie to whole php thing so bear with me Link to comment Share on other sites More sharing options...
aspnetguy Posted March 11, 2008 Share Posted March 11, 2008 Well, since you can't download or install PHP 6 at this point I would say start with PHP 5.If this forum had a rating system like /. This would be 5, Funny. Link to comment Share on other sites More sharing options...
tyweiss Posted March 11, 2008 Share Posted March 11, 2008 if the functions in php were what made it hard for you here is a list of the functions @ php.net http://www.php.net/quickref.php...click on one of the functions listed and they usually have a very detailed explanation and examples using the function posted below the explanation...if ever you get confusedafter you get the syntax down ... you can pretty much build anythingI suggest you learn both in small bits working on little examples and learning the syntax, because knowing both opens up a whole lot of options for what you can do.... php for server side scripting and javascript for client side..together a pretty solid site ....not to mention throwing your css knowledge into the mix Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 11, 2008 Share Posted March 11, 2008 Along the vane of what Synook said, if you get overwhelmed by all the *stuff* in a language, don't use all of it. Use what you need to do what you want, and ignore all the rest. After a few projects, I expect you would be more comfortable with the stuff.Oh, and don't forget to ask questions! Link to comment Share on other sites More sharing options...
Luke4123 Posted March 11, 2008 Author Share Posted March 11, 2008 Well I had a quick look here:http://www.w3schools.com/php/and I couldnt find out how to make a forum??? Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 11, 2008 Share Posted March 11, 2008 Hm, I think you need a big dose of patience. What's a forum made of? It's got a comment form, a database (maybe more than one), several PHP files to display small portions of that database, password protection... You've got to learn how to make that stuff first, then put it all together.I don't know how to make a forum either, lol. You'd probably have to be an absolute guru before you could do that. But why are you so eager to build your own forum software? Why not use the ones already out there? Link to comment Share on other sites More sharing options...
Luke4123 Posted March 11, 2008 Author Share Posted March 11, 2008 I reckon it would be cool to have your own. Also I have gone back to some PHP Tutorials to have look but I cant understand the variables. I just sit there at look at them because I dont know what to right in them. Is there like a list of variables you can put in? Link to comment Share on other sites More sharing options...
Ingolme Posted March 11, 2008 Share Posted March 11, 2008 Well I had a quick look here:http://www.w3schools.com/php/and I couldnt find out how to make a forum???A forum is a pretty large and complicated program to make. It can be done in PHP, but it's nothing as simple as writing create_forum(parameters). You need to know a whole lot about PHP and databases to do it. W3Schools doesn't tell you how to make things with a programming language, it tells you how to use the programming language. After that it's up to you to use your imagination to put together what you've learnt to make what you want. Link to comment Share on other sites More sharing options...
jeffman Posted March 11, 2008 Share Posted March 11, 2008 Start small. I assume you have an HTML page that pretty much works. Why not add something simple to it, like a random greeting?Save 10 short greetings in a text file in the same directory as your HTML page. One greeting per line. Call the file greetings.txtRename your HTML page to a PHP page.Add a very short routine at the top of the page inside the <? ?> separaters.The routine will do these things:Open your greetings fileRead everything in the greetings file into an array of strings, one greeting per item.Close your file.Generate a random integer between 0-9. This will become the index that you'll select the greeting with. Something like $myGreeting = $greetingArray[$myRandomInt]Close the routine.Now that you have the greeting stashed in a variable, print a smaller routine to echo the value of the variable anywhere on your page that you like. Something like <? echo $myGreeting ?>It's a simple task, but the best learning tools always are. Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 11, 2008 Share Posted March 11, 2008 I reckon it would be cool to have your own. Yeah, it would. But I think I understand why you're overwhelmed by PHP now: You're trying to take the whole burger in with your first bite. If you keep on doing that, you'll give up before getting a decent taste of it.Also I have gone back to some PHP Tutorials to have look but I cant understand the variables. I just sit there at look at them because I dont know what to right in them. Is there like a list of variables you can put in?Like which ones? Are you talking about the superglobals (the ones that start with '$_')? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.