SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: Learning PHP
-
May 14, 2009, 06:35 #1
- Join Date
- May 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Learning PHP
Hi everyone,
I would like to ask you, what is the quickest way to learn php? Also how long do you think it would take for a newbie to gain the knowledge to develop a simple cms?
Thanks
-
May 14, 2009, 06:55 #2
- Join Date
- Jan 2002
- Location
- Australia
- Posts
- 2,634
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
1) buy a beginners book such as Sitepoint's Building Database Driven Websites and also learn to read the PHP documentation. When I say "learn to read" I'm not being condescending, there is a specific way function references are written which makes reading the documentation a lot more productive.
For example have a look at the docs for the trim function.
Code:string trim ( string $str [, string $charlist ] )
trim is the function name
the (parenthesis) contain a list of arguments, or parameters that are passed to the function as variables
$str is the first argument and the function expects it to be a string
$charlist is an optional second argument, and should also be a string if supplied. You can tell it's optional because it's wrapped in square brackets
So:
PHP Code:echo trim(); //invalid. Missing required argument
echo trim(array()); //invalid. argument is not a string
echo trim(' I love breathing '); //valid. spaces at either end of string will be removed
echo trim('To be continued....', '.'); //valid. The full stops at the end of the string will be removed
-
May 15, 2009, 03:29 #3
- Join Date
- Jun 2007
- Location
- Cape Town
- Posts
- 233
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Good luck with learning PHP. I've started with w3schools.com and learnphp.org and beginner's books. It hasn't been quick for me
-
May 20, 2009, 00:13 #4
- Join Date
- May 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
@cranial-bore - thanks for the feedback, I already bought the book you mentioned I just need to dedicate lots of time and patience to it
Bookmarks