General Community > Scripting Help

php question about brackets ()

<< < (2/3) > >>

MrPhil:
Are you familiar with any programming languages, or is PHP your first? As with any language, statements (like the "if" condition) can be spread across multiple lines. They're not separate statements -- they're one statement spread across multiple lines. If PHP is your first language, I don't think you're going to succeed in understanding it from an online course, which assumes that you have basic programming knowledge already. I'm not trying to insult you, but I suggest that you get yourself a very basic introductory book on either C (which PHP is quite similar to) or PHP, one that starts at the level of "a variable is a box with a name on it, that you can put a value in." That sort of thing.

P.S. Calling ( ) "brackets" may be proper British English usage, but in the programming world you will get confused. There, ( ) are parentheses, [ ] are (square) brackets, and { } are (curly) braces.

ApplianceJunk:
I only know some html. :(

thanks,

ApplianceJunk:

--- Quote ---I'm not trying to insult you, but I suggest that you get yourself a very basic introductory book on either C (which PHP is quite similar to) or PHP, one that starts at the level of "a variable is a box with a name on it, that you can put a value in." That sort of thing.
--- End quote ---

Have any books you would recommend I start with?

MrPhil:
I don't have any such introductory book any more, so I can't give titles. I would suggest going to your local chain bookshop and look for "Teach Yourself ___ in 24 Hours" or "____ for Dummies" (that's actually the title of a line of introductory books). Look for a book that introduces the concepts of programming, assuming nothing, and not a reference book (which isn't going to teach the basics). If you can't find something specific to PHP, the C programming language is a good stand-in (PHP's syntax is almost identical to C's). Once you have the basics of PHP down, you can return to the online courses and eventually go into more advanced topics such as Object Oriented programming.

You mentioned "knowing some HTML". HTML is not programming -- it's statically describing a page's formatting. You're looking for something to get you going on procedural languages. After that can come OO.

ApplianceJunk:
No local bookshops around here. :(

Been reading some reviews and sample pages of php books online.
Going to start with this one and see how far it gets me.

PHP Solutions: Dynamic Web Design Made Easy
http://www.amazon.com/gp/product/B004EPYYRW

Thanks again,

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version