Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

New to PHP


ghost's Avatar
0 0

I learned a fair amount of other languages, but i avoided php for some reason. anyways, i just started learning because someone gave a copy of Teach Yourself PHP, MySQL, and Apache for free and i figured y not. but i've learned some and im toward the middle of the book and it talks about the print() function instead of the echo() function. are there any pros or cons between the two? I've googled it and read that it's just a matter of taste, but i was just wondering. also r they're any free php editors? the only ones I've found cost $$ and I'm kinda broke. any help is appreciated, thnx :happy:


Mr_Cheese's Avatar
0 1

print vs echo.

as you said, basically its a matter of taste. print i believe is faster… but obvioulsy its a fact of 0.1 of a milisecond faster, and usally print is only used for static content. it can handle variables, but usally echo is used for that.

print and echo are just there to vary your code and make it more easily annotated and readable.. thats what i use each for.

if i want "<strong>title here</strong>" to be displayed at the top of a page i'll use print().. if im in a loop and variables are being used i'll use echo. echo "<u>" . $youNameHere . "</u>";

just a matter of taste, i find for me its easier to naivgate the code and work with.

in regards to a php editor… back in the days, i simply used notepad, until i moved to a company that could afford PHP Designer 2007 and Dreamweaver MX.

but if you cant stand hours of debugging because you use notepad.. PHP Designer and Dreamweaver MX are awesome to use. I prefer Dreamweaver for working on cleints websites because it supports FTP.

PHP Designer doesnt support FTP but it does do nice tricks with quotes and functions, so its good if your working on a local / beta development environment.

hope the above post helps, best of luck with your PHP coding. if you really want to progress in web development, after you've mastered PHP, learn ColdFusion.. thats where the money is.


ghost's Avatar
0 0

thnx, very helpful, ill check out dreamweaver.:D


ghost's Avatar
0 0

Mr_Cheese wrote: if you really want to progress in web development, after you've mastered PHP, learn ColdFusion.. thats where the money is.

why would he ever want to learn something just to make money?


ghost's Avatar
0 0

lesserlightsofheaven wrote: [quote]Mr_Cheese wrote: if you really want to progress in web development, after you've mastered PHP, learn ColdFusion.. thats where the money is.

why would he ever want to learn something just to make money?[/quote]

Because money is good?

Also because ColdFusion might be a good language (never tried it myself).


Mr_Cheese's Avatar
0 1

lesserlightsofheaven wrote: why would he ever want to learn something just to make money?

because money pays for a nice flat, nice food, nice holidays? its called living in the real world :p

besides, coldfusion **is/will **be the new up and comming web language and theres a shortage in developers.


ghost's Avatar
0 0

mastergamer wrote:

Because money is good?

Also because ColdFusion might be a good language (never tried it myself).

money isn't a drive to do something. you do something because you like it. would you want to spend your whole life making millions of dollars doing something you absolutely despise? you'd off yourself.


ghost's Avatar
0 0

http://www.phpfreaks.com/ This place may come in handy. I've just started to learn php and this place is a great tool for me. I'm almost mad that I even bought a book after i found this site. By the way, call me retarded but I don't understand how CF is where the money's @… I believe it's easier to use, but I think if your working for a company their going to want you to write in php because it is free and most commonly used. Anyways feel free to correct me or give me another perspective. ;)


Mr_Cheese's Avatar
0 1

very true… so.. heres an excellent solution.

if you love coding.hacking and thats your passion…. make millions of dollars from coding/hacking. :D


ghost's Avatar
0 0

Mr_Cheese wrote:

because money pays for a nice flat, nice food, nice holidays? its called living in the real world :p

besides, coldfusion **is/will **be the new up and comming web language and theres a shortage in developers.

I'm well aware of how the real world works. If there's a shortage of developers, that's a different story. Then he's contributing to a greater cause where he's needed.


ghost's Avatar
0 0

Mr_Cheese wrote: very true… so.. heres an excellent solution.

if you love coding.hacking and thats your passion…. make millions of dollars from coding/hacking. :D

fair enough. I'm just saying that may not be everyones ideal.


Mr_Cheese's Avatar
0 1

fair enough.. if you come up with a idea on how to make millions from coding/hacking…. (besides starting a company such as norton) please let me know!! lol :happy:


nanoymaster's Avatar
the master of nanoy(.org)
0 0

tell ya what I would kill for a job in IT. since I don't I suggest you just learn, play hack and destroy stuff :evil:

do only what you enjoy.


ghost's Avatar
0 0

notepad++!!!!


ghost's Avatar
0 0

lesserlightsofheaven wrote: [quote]mastergamer wrote:

Because money is good?

Also because ColdFusion might be a good language (never tried it myself).

money isn't a drive to do something. you do something because you like it. would you want to spend your whole life making millions of dollars doing something you absolutely despise? f.[/quote] yes cause then i would take my millions and retire early :-)


ghost's Avatar
0 0

lesserlightsofheaven wrote: [quote]Mr_Cheese wrote:

because money pays for a nice flat, nice food, nice holidays? its called living in the real world :p

besides, coldfusion **is/will **be the new up and comming web language and theres a shortage in developers.

I'm well aware of how the real world works. If there's a shortage of developers, that's a different story. Then he's contributing to a greater cause where he's needed.[/quote]

lesser u turn this thread into such a philosophy problem … he was just asking for PHP help … if money isnt important to you, good for you, for others it is now let us leave it at that.


ghost's Avatar
0 0

practice_123 wrote: lesser u turn this thread into such a philosophy problem … he was just asking for PHP help … if money isnt important to you, good for you, for others it is now let us leave it at that.

Up until you replied, that part of the thread was long gone and overwith. Myself and any others with differing opinions already agreed to disagree. So, no, YOU are turning this thread into a philosophy problem.


ghost's Avatar
0 0

lesserlightsofheaven wrote: [quote]practice_123 wrote: lesser u turn this thread into such a philosophy problem … he was just asking for PHP help … if money isn't important to you, good for you, for others it is now let us leave it at that.

Up until you replied, that part of the thread was long gone and overwith. Myself and any others with differing opinions already agreed to disagree. So, no, YOU are turning this thread into a philosophy problem.[/quote]

You started talking about if money is important or not in a thread about PHP print or echo functions . I didn't go off topic like you did, i didn't turn this into a philosophical thread YOU did .. and this would never have started up if you wouldnt have ranted on about money isnt important blah blah blah.. whocares you need money for basic living expenditures and vacations and such. So dont try and quote me and be like your the one who screwed the topic up because you did buddy.

But we digress since you will not agree you were in the wrong and I know I am not so this is the internet what can you do.


PHP designer is great, although i love using notepad because you get to turn all your hard work into a functioning program.


ghost's Avatar
0 0

practice_123 wrote:

You started talking about if money is important or not in a thread about PHP print or echo functions . I didn't go off topic like you did, i didn't turn this into a philosophical thread YOU did .. and this would never have started up if you wouldnt have ranted on about money isnt important blah blah blah.. whocares you need money for basic living expenditures and vacations and such. So dont try and quote me and be like your the one who screwed the topic up because you did buddy.

But we digress since you will not agree you were in the wrong and I know I am not so this is the internet what can you do.


PHP designer is great, although i love using notepad because you get to turn all your hard work into a functioning program.

He might've made it off topic but your keeping it offtopic which is just as bad

(yes i know i am also keeping it off topic also by posting this but i just wanted to give my 2 cents worth)