Re: [PHP] Learning PHP
At 12:27 PM -0500 12/12/09, Robert H wrote: What is a good beginners programming book for PHP? I like "dead trees" more than reading stuff on my screen, so I am looking for a book. Thanks! Bob Bob: I've purchased and read literally scores of programming books and all have value. In fact, I've never read a book that I didn't learn something from. However, IMO the best thing to learn in the beginning is that php does not live in a vacuum. It is a server-side programming language that cannot function to it's fullest without other languages. As such, the best book I've read lately has been "PHP, MySQL & Javascript" by Nixon published by O'Reilly. You can buy it on Amazon for less than $27.00 and it's well worth the price. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
On Sat, Dec 12, 2009 at 9:27 AM, Robert H wrote: > What is a good beginners programming book for PHP? I like "dead trees" more > than reading stuff on my screen, so I am looking for a book. O'Reilly is good for getting the facts. You could start with Programming PHP: http://oreilly.com/catalog/9781565926103/ Check the O'Reilly PHP page for more resources, some printed: http://oreilly.com/php/ If you're looking for books that specifically cover PHP's OO features, there are lots of older books on pre-5.3 features, like Zandstra's PHP 5 Objects, Patterns, and Practice (2004): http://www.amazon.com/PHP-5-Objects-Patterns-Practice/dp/1590593804/ref=sr_1_3?ie=UTF8&s=books&qid=1260652305&sr=8-3 Although if you're new to OOP you may want to read more general books on the subject and then work your way back to the features available in the version of PHP that you need to use. In general, the best publishers I've found are O'Reilly, The Pragmatic Programmers, Apress and Packt. Best, -- Andrew Brookins a.m.brook...@gmail.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
Programming php from Eric Bastien Sent from my iPod On Dec 12, 2009, at 12:27 PM, Robert H wrote: What is a good beginners programming book for PHP? I like "dead trees" more than reading stuff on my screen, so I am looking for a book. Thanks! Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
On Sun, 2009-12-13 at 01:42 +0700, shiplu wrote: > On Sun, Dec 13, 2009 at 12:27 AM, Robert H wrote: > > What is a good beginners programming book for PHP? I like "dead trees" more > > than reading stuff on my screen, so I am looking for a book. > > > > There are plenty of books in amazon.com > Order one and start reading. > -- > A K M Mokaddim > My talks, http://talk.cmyweb.net > Follow me, http://twitter.com/shiplu > SUST Programmers, http://groups.google.com/group/p2psust > Innovation distinguishes bet ... ... (ask Steve Jobs the rest) > Pretty much anything by O'reilly is a good buy. I've not had them steer me wrong yet. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Learning PHP
On Sun, Dec 13, 2009 at 12:27 AM, Robert H wrote: > What is a good beginners programming book for PHP? I like "dead trees" more > than reading stuff on my screen, so I am looking for a book. > There are plenty of books in amazon.com Order one and start reading. -- A K M Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Learning PHP
What is a good beginners programming book for PHP? I like "dead trees" more than reading stuff on my screen, so I am looking for a book. Thanks! Bob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP - question about hidden form fields
Wanted to thank the handful of you who wrote me with some hints. I really appreciate the guidance. :) The test form is working like a champ. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Learning PHP - question about hidden form fields
iggep... what are you trying to do with the following: >>echo ""; >>echo ""; if i had to guess, i'm pretty sure you're trying to assign the val of 'preform_submitted' to 'form_submitted'... but i'm not sure why... $preform_submitted will not have the val you think it does.. in fact, from your sample, it's not defined... in your sample, when you call the form.php using the POST method, the elements in the form are available via the $_POST array... so you could simply check for the val of $_POST['preform_submitted'] and assign that to the hidden val.. in a similar manner, you could also check in your logic using the $_POST[] val... -bruce -Original Message- From: Iggep [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 07, 2005 3:47 PM To: php-general@lists.php.net Subject: [PHP] Learning PHP - question about hidden form fields Hey all! I sat down and started learning PHP today and ran into a bit of a spot. Hoped someone here could lead me in the right direction. I created a simple test form called form.php. I thought I had this strait in my mind when I created it, but obviously it didn't work. All I want to do is create a static value and pass it back to the page which then triggers a statement for the user to read. Problem I'm running into is that I can't seem to find a way to pass that variable correctly with all this being on a single file. I'd prefer to do this in a single file if possible. Any ideas? Test Form Thank you for submitting your trouble ticket. We have received your trouble ticket and will be in touch with you about it as soon as possible."; echo "If you wish to submit another ticket, please use the form below."; } echo ""; echo ""; echo ""; echo ""; echo "Last Name:"; echo "First Name:"; echo "Email Address:"; echo "Trouble:"; echo ""; echo ""; echo ""; echo ""; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP - question about hidden form fields
On Wed, Sep 07, 2005 at 06:47:28PM -0400, Iggep wrote: > Hey all! I sat down and started learning PHP today and ran into a bit of a > spot. Hoped someone here could lead me in the right direction. I created a > simple test form called form.php. I thought I had this strait in my mind > when I created it, but obviously it didn't work. All I want to do is create > a static value and pass it back to the page which then triggers a statement > for the user to read. > > Problem I'm running into is that I can't seem to find a way to pass that > variable correctly with all this being on a single file. I'd prefer to do > this in a single file if possible. > > Any ideas? > > > > Test Form > > > > if (defined('form_submitted')){ > echo "Thank you for submitting your trouble ticket. We have > received your > trouble ticket and will be in touch with you about it as soon as > possible."; > echo "If you wish to submit another ticket, please use the form > below."; > } > > echo ""; > echo ""; > echo ""; > echo ""; > echo "Last Name: type='text'>"; > echo "First Name: type='text'>"; > echo "Email Address: type='text'>"; > echo "Trouble:"; > echo ""; > echo ""; > echo ""; > echo ""; > ?> > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- Jim Kaufman Linux Evangelist public key 0x6D802619 CCNA, CISSP# 65668 --- Scientists inhabit quite an inhuman world, and so they tend to believe in a universe beyond people. And young people destined to become good scientists tend to be more curious about the universe around them than about other people. -- Jerry Ostriker (Astrophysicist) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Learning PHP - question about hidden form fields
Hey all! I sat down and started learning PHP today and ran into a bit of a spot. Hoped someone here could lead me in the right direction. I created a simple test form called form.php. I thought I had this strait in my mind when I created it, but obviously it didn't work. All I want to do is create a static value and pass it back to the page which then triggers a statement for the user to read. Problem I'm running into is that I can't seem to find a way to pass that variable correctly with all this being on a single file. I'd prefer to do this in a single file if possible. Any ideas? Test Form Thank you for submitting your trouble ticket. We have received your trouble ticket and will be in touch with you about it as soon as possible."; echo "If you wish to submit another ticket, please use the form below."; } echo ""; echo ""; echo ""; echo ""; echo "Last Name:"; echo "First Name:"; echo "Email Address:"; echo "Trouble:"; echo ""; echo ""; echo ""; echo ""; ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP ... online courses?
A few months back I signed up for the O'Reilly Safari Bookshelf. For about $20 a month you can check out up to 10 books to read online (put them on your bookshelf). Too many times I've bought a book and found only one or two chapters helpful. Or bought a book for a specific chapter. Now I can just read the chapters I need online. If I find the whole book helpful, I'll buy it. O'Reilly provides discounts on books for bookshelf subscribers. Something to look into if you plan on learning on a lot, especially on different subjects. That said, I learned PHP by reading "PHP and MySQL Web Development" from SAMS. I don't know if it's been updated for PHP5. Someone else mentioned php architect magazine. I think that's and excellent resource. You can just subscribe to the PDF version if you want to save some money. On May 23, 2005, at 3:45 PM, Bill McEachran wrote: I'm just learning PHP. If anyone knows of any affordable quality on-line based PHP courses please pass on the details. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP ... online courses?
The Manual is great - but most people seem to get the hang of PHP faster if they Watch people in action - then move onto reading the Manual... Chris Shifflett's link (where he's an Instructor) is great too (phparch.com)...
Re: [PHP] Learning PHP ... online courses?
Bill McEachran wrote: I'm just learning PHP. If anyone knows of any affordable quality on-line based PHP courses please pass on the details. php|architect provides a live, comprehensive online training course for PHP: http://phparch.com/shop_product.php?itemid=89 Disclaimer: I'm one of the designers of the program as well as an instructor. Chris -- Chris Shiflett Brain Bulb, The PHP Consultancy http://brainbulb.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP ... online courses?
_www.Lynda.com_ (http://www.Lynda.com) has a new Video tutorial... about 9 1/2 hours long. Best one I've found for the price would be _www.VTC.com_ (http://www.VTC.com) which is $30 a month and you can get like 25 total hours of PHP and MySQL... They're good for Beginners - then check out books like Advanced PHP for Web Professionals. Hope this helps! - Clint
[PHP] Learning PHP ... online courses?
I'm just learning PHP. If anyone knows of any affordable quality on-line based PHP courses please pass on the details. Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] learning php - problem already
> -Original Message- > From: CPT John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: 31 July 2003 15:54 > you basically > have this: > > list($k,$v,$key,$value) = array(1=>'abc', 'value'=>'abc', 0=>'a', > 'key'=>'a'); > > So, how this works is that list starts with $value. $value is > at position > number four, so since arrays start at zero, it's going to > look in the array > that was passed for an element at [3]. Since there is no [3] > in the passed > array, you get a NOTICE about undefined offset. > > Next it moves on to $key and looks for element [2]. Again you > get a warning > since there is no element [2] in the passed array. > > Next is $v and list is looking for [1]. Since [1] does exist > and has a value > of 'abc', now $v = 'abc' > > Last is $k and [0] and you get $k = 'a'. > > That's how it works. :) > > That's why this code: > > list($a, $b, $c, $d) = array(4=>'four', 3=>'three', 2=>'two', > 1=>'one', > 0=>'zero'); > echo "$a, $b, $c, $d"; > > gives: > > zero, one, two, three Ho, thanks for that -- I must admit I hardly ever use each() or list(), and taking a quick look at the current manual page for list() does seem to have changed quite a bit since I originally read it -- so I guess my understanding of it was faulty. I still think it's quite confusing -- your explanation here is much better -- so I might see if I can't put together something even better for incorporation in the manual! Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]> > From: John W. Holmes [mailto:[EMAIL PROTECTED] > > The four element array will be > > 1 => 'one' > > value => 'one' > > 0 => 0 > > key => 0 > > OK, some more red pen coming along Since we're whipping them out (red pens that is) > The four-element array would actually be: > > 0=>0 > 1=>'one' > 'key'=>0 > 'value'=>'one' Nope. Try this example from the manual and you'll see that you get the order I gave $foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese"); $bar = each ($foo); print_r($bar); The order is pretty irrelevant, though. >list($k, $v, $key, $value) = each($a); > > you would, in this case, now have $k==0, $v=='one', $key==0, $value=='one'. Nope.. try that and you'll get two notices about undefined offsets at 3 and 2. $key and $value will not have any value at all. Not that this really matters, but since this is fun to argue about... $a = array('a' => 'abc'); Since we know that each($a) will return what I gave above, you basically have this: list($k,$v,$key,$value) = array(1=>'abc', 'value'=>'abc', 0=>'a', 'key'=>'a'); So, how this works is that list starts with $value. $value is at position number four, so since arrays start at zero, it's going to look in the array that was passed for an element at [3]. Since there is no [3] in the passed array, you get a NOTICE about undefined offset. Next it moves on to $key and looks for element [2]. Again you get a warning since there is no element [2] in the passed array. Next is $v and list is looking for [1]. Since [1] does exist and has a value of 'abc', now $v = 'abc' Last is $k and [0] and you get $k = 'a'. That's how it works. :) That's why this code: list($a, $b, $c, $d) = array(4=>'four', 3=>'three', 2=>'two', 1=>'one', 0=>'zero'); echo "$a, $b, $c, $d"; gives: zero, one, two, three as the result, even though you passed a five element array in reverse order. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] learning php - problem already
> -Original Message- > From: John W. Holmes [mailto:[EMAIL PROTECTED] > Sent: 29 July 2003 23:05 > > Curt Zirzow wrote: > > Ok... I'm getting the red pen out now :) > [snip] > > the each() function returns a one element array that the current > > (internal) array pointer is pointing to and will return false if at > > the end of the array. > > It actually returns a four element array (as per the manual). > > > the list() function (not really a function) takes an array on the > > right side of the = operator and assigns each variable its value in > > order returned from the array. > > Right > > > so with the example array(0 => 'one', 1 => 'two'), the > initial internal > > pointer is looking at the first item so when the while statement > > evaluates the the statement the each() function returns: > > 0 => 'one' > > The four element array will be > 1 => 'one' > value => 'one' > 0 => 0 > key => 0 OK, some more red pen coming along The four-element array would actually be: 0=>0 1=>'one' 'key'=>0 'value'=>'one' in that order. So... > > > This array gets returned to the list statement > > list($k, $v) the list takes the first 2 elements (0=>0, 1=>'one') and assigns their values to $k and $v respectively, giving $k==0, $v=='one' -- the remaining 2 elements are dropped because there's nothing to assign them to. If you cared to put 4 variables in the list() structure, thus: list($k, $v, $key, $value) = each($a); you would, in this case, now have $k==0, $v=='one', $key==0, $value=='one'. Cheers! Mike - Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: [EMAIL PROTECTED] Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > * Thus wrote John W. Holmes ([EMAIL PROTECTED]): > > [snip] > don't but all that matters to most is: it works.. and foreach has > taken over its job anyway. Just a small comment... foreach() is not equal to a while/each loop. Foreach uses a copy of the array, and not the array itself. This might not sound important, but it was for me when I tried to add new elements to the array in the middle of a foreach() loop. They didn't show up until after the loop, which was a bit confusing for me at first. So occasionally when I need to add elements during a loop, I still use while(list(..) = each(...)). -- Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
Curt Zirzow wrote: * Thus wrote Curt Zirzow ([EMAIL PROTECTED]): think it was made to be intentionally confusing. For what reason, I don't but all that matters to most is: it works.. and foreach has I cant type nor proof read today... at least before hitting send. I think I understood you. ;) I agree. -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
* Thus wrote Curt Zirzow ([EMAIL PROTECTED]): > think it was made to be intentionally confusing. For what reason, I > don't but all that matters to most is: it works.. and foreach has I cant type nor proof read today... at least before hitting send. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
* Thus wrote John W. Holmes ([EMAIL PROTECTED]): > > and apparently list() will ignore the keys that do not have numerical > indexes. The manual says numerical indexes are required, but not what > happens when they are encounted. It looks like they are just ignored. > > list($k,$v) = array('foo'=>'one','two','three'); > > for example will give $k = 'two', and $v = 'three'. 'one' is completely > ignored because it does not have a numerical key. > > Kind of a wierd operation that "works" without you knowing all of the > details, I guess. I had to come home and actually test some things out > before I realized these last bits. :) I vaguely remember a discussion about this on the dev list. I think it was made to be intentionally confusing. For what reason, I don't but all that matters to most is: it works.. and foreach has taken over its job anyway. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
Curt Zirzow wrote: Ok... I'm getting the red pen out now :) [snip] the each() function returns a one element array that the current (internal) array pointer is pointing to and will return false if at the end of the array. It actually returns a four element array (as per the manual). the list() function (not really a function) takes an array on the right side of the = operator and assigns each variable its value in order returned from the array. Right so with the example array(0 => 'one', 1 => 'two'), the initial internal pointer is looking at the first item so when the while statement evaluates the the statement the each() function returns: 0 => 'one' The four element array will be 1 => 'one' value => 'one' 0 => 0 key => 0 This array gets returned to the list statement list($k, $v) and apparently list() will ignore the keys that do not have numerical indexes. The manual says numerical indexes are required, but not what happens when they are encounted. It looks like they are just ignored. list($k,$v) = array('foo'=>'one','two','three'); for example will give $k = 'two', and $v = 'three'. 'one' is completely ignored because it does not have a numerical key. Kind of a wierd operation that "works" without you knowing all of the details, I guess. I had to come home and actually test some things out before I realized these last bits. :) -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ PHP|Architect: A magazine for PHP Professionals – www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
Ok... I'm getting the red pen out now :) * Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]): > > Hello everyone, > > Am new to php and have run into a problem while reading my book... can > anybody tell me what does this mean: > > Hi... let's see who gets this one first... :) > > > foreach($invoice as $number => $pppno) > > $invoice is an array. foreach() is going to loop through that array one > element at a time. For each element, it'll take the key and place it into > $number. It will take the value of the element and place it in $pppno. So, > if you had array('one','two'), the first element is "one" with a key of zero > (default). So, the first time through the loop, $number will be zero and > $pppno will be "one". The next time through the loop, $number will be one > and $pppno will be "two". passed :) > > > and also this: > > > > while(list($k,$v,) = each($a)) > > Same kind of thing here, just a different method. each() loops through an > array. For each element, it'll return an array consisting of the key and > value. list() takes that array and assigns the first element of the array to > $k and the second to $v. The final while() just loops through everything > until all of the elements of $a have been run through. So, if we have our > array('one','two); again, each() will take the first element, "one", and > pass an array consisting of the key, zero, and the value, "one" to list(). > list() will assign zero to $k and "one" to $v. This one is rather confusing, and is sort of the reason why i didn't go in depth and will only give a brief summery here: the each() function returns a one element array that the current (internal) array pointer is pointing to and will return false if at the end of the array. the list() function (not really a function) takes an array on the right side of the = operator and assigns each variable its value in order returned from the array. so with the example array(0 => 'one', 1 => 'two'), the initial internal pointer is looking at the first item so when the while statement evaluates the the statement the each() function returns: 0 => 'one' This array gets returned to the list statement list($k, $v) Thus $k gets the value 0 and $v gets 'one'. Now the pointer is moved to: 1 => 'two' the loop comes back to the while and repeats the steps until the internal pointer is at the end of the array. With that being said it is almost always common to see this statement before this kind of loop because we want to make sure the pointer is at the beginning. reset($a); The foreach statement doesn't need this. > > Hope that helps. That was as much of a test for me in seeing if I could > explain it, so tell me how I did! :) I'll still give you an A :-) cheers! Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
> Hello everyone, > Am new to php and have run into a problem while reading my book... can anybody tell me what does this mean: Hi... let's see who gets this one first... :) > foreach($invoice as $number => $pppno) $invoice is an array. foreach() is going to loop through that array one element at a time. For each element, it'll take the key and place it into $number. It will take the value of the element and place it in $pppno. So, if you had array('one','two'), the first element is "one" with a key of zero (default). So, the first time through the loop, $number will be zero and $pppno will be "one". The next time through the loop, $number will be one and $pppno will be "two". > and also this: > > while(list($k,$v,) = each($a)) Same kind of thing here, just a different method. each() loops through an array. For each element, it'll return an array consisting of the key and value. list() takes that array and assigns the first element of the array to $k and the second to $v. The final while() just loops through everything until all of the elements of $a have been run through. So, if we have our array('one','two); again, each() will take the first element, "one", and pass an array consisting of the key, zero, and the value, "one" to list(). list() will assign zero to $k and "one" to $v. > I do understand for loops and while loops but this is a bit confusing...do you haev any links I can read up on these? Hope that helps. That was as much of a test for me in seeing if I could explain it, so tell me how I did! :) ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]): > > Hello everyone, > Am new to php and have run into a problem while reading my book... can anybody tell > me what does this mean: > > foreach($invoice as $number => $pppno) this rather straight forward: foreach([array] as [key] => [val] ) > > and also this: > > while(list($k,$v,) = each($a)) This one is a little more involved but it really does the same thing as the foreach loop (above) but is backward compatible to php 3.0. > > I do understand for loops and while loops but this is a bit confusing...do you haev > any links I can read up on these? The php manual is an excellent resource for learning the information http://www.php.net/ And a little trick for those who don't like clicking around alot and know the function name your looking for: If you type 'php.net/foreach' in your browser, the php site will direct you to the proper page. If you typed it wrong or no statement/function is found it sends you to a google search with that term, yeilding excelent results (usually is a lucky match that you wanted). Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] learning php - problem already
I can't help you with the while loop, but foreach loops are very nice to work with. It took me a while to figure it out as well. You can use the foreach to loop through all the instances of an array. This works best when you have an associative array ($state['CA'] = "Sacremento", $state['OR'] = "Salem", etc.) foreach ($state as $abbreviation => $capital) The above foreach statement takes the index of state and assigns it to $abbreviation, while it takes the actual value and assigns it to $capital. The process is repeated for each instance of $state. Hope this helps. Robbert van Andel -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 1:43 PM To: [EMAIL PROTECTED] Subject: [PHP] learning php - problem already Hello everyone, Am new to php and have run into a problem while reading my book... can anybody tell me what does this mean: foreach($invoice as $number => $pppno) and also this: while(list($k,$v,) = each($a)) I do understand for loops and while loops but this is a bit confusing...do you haev any links I can read up on these? Thanks in advance, -Karin Cooke. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] learning php - problem already
I do understand for loops and while loops but this is a bit confusing...do you haev any links I can read up on these? http://www.php.net/manual/en/ has all the info you need -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] learning php - problem already
Hello everyone, Am new to php and have run into a problem while reading my book... can anybody tell me what does this mean: foreach($invoice as $number => $pppno) and also this: while(list($k,$v,) = each($a)) I do understand for loops and while loops but this is a bit confusing...do you haev any links I can read up on these? Thanks in advance, -Karin Cooke. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
At 16:14 12.02.2003, Greg Luce said: [snip] >Could anyone recommend a fast track for learning php for an experienced >ColdFusion developer? I'm working my way through the tutorials on >php.net and free2code.net, but they seem pretty kindergarten. Any >advice? [snip] Well, when I made my move to PHP (coming from Tango you probably know, being a CF guy) I was successful by simply eating the online docs. They have good value (not perfect, but...) and sometimes very interesting user comments. When I found some snippets I liked I simply tried them out and played around with the code. Got up and running in less than a week. -- >O Ernest E. Vogelsinger (\)ICQ #13394035 ^ http://www.vogelsinger.at/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Learning PHP
You may want to wait a few days on this book. The 2nd edition is due out tomorrow. Search on 0-672-32525-X -Original Message- From: Brent Baisley [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 12, 2003 9:19 AM To: Greg Luce Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Learning PHP Normally I don't recommend a SAMS book since I often find them lacking depth. But I picked up"PHP and MySQL Web Devlopment" and actually thought it very helpful. By chapter two you're reading and writing files and by page 150 (of and 800+ page book) you're into object oriented programming. It covers most everything you would want to do from creating graphics on the fly, to making a forum and ecommerce. It also has a few chapters on security, which is a very good thing. The one area that did bother me was that only one chapter was dedicated to creating an ecommerce site and one other chapter to ecommerce security issues. Personally, I think ecommerce could have it's own book and shouldn't haven't been included. But I guess if you are experienced in creating ecommerce sites it's good to have an overview of it. On Wednesday, February 12, 2003, at 10:14 AM, Greg Luce wrote: > Could anyone recommend a fast track for learning php for an > experienced ColdFusion developer? I'm working my way through the > tutorials on php.net and free2code.net, but they seem pretty > kindergarten. Any advice? > > -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
Normally I don't recommend a SAMS book since I often find them lacking depth. But I picked up"PHP and MySQL Web Devlopment" and actually thought it very helpful. By chapter two you're reading and writing files and by page 150 (of and 800+ page book) you're into object oriented programming. It covers most everything you would want to do from creating graphics on the fly, to making a forum and ecommerce. It also has a few chapters on security, which is a very good thing. The one area that did bother me was that only one chapter was dedicated to creating an ecommerce site and one other chapter to ecommerce security issues. Personally, I think ecommerce could have it's own book and shouldn't haven't been included. But I guess if you are experienced in creating ecommerce sites it's good to have an overview of it. On Wednesday, February 12, 2003, at 10:14 AM, Greg Luce wrote: Could anyone recommend a fast track for learning php for an experienced ColdFusion developer? I'm working my way through the tutorials on php.net and free2code.net, but they seem pretty kindergarten. Any advice? -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
Greg -- ...and then Greg Luce said... % % Could anyone recommend a fast track for learning php for an experienced % ColdFusion developer? I'm working my way through the tutorials on % php.net and free2code.net, but they seem pretty kindergarten. Any % advice? I had extensive perl experience as well as lots of other programming and scripting experience when I started to look at PHP. I got the PHP Developer's Cookbook from SAMS by Sterling Hughes and worked through the examples in there; by the time I had finished the book I had a working knowledge of PHP and was coding away. Have you checked the list archives? I know that "what book?" has come up at least a couple of times recently... HTH & HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, "Science and Health" http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! msg96669/pgp0.pgp Description: PGP signature
Re: [PHP] Learning PHP
On Wednesday 12 February 2003 10:14 am, Greg Luce wrote: > Could anyone recommend a fast track for learning php for an experienced > ColdFusion developer? I'm working my way through the tutorials on > php.net and free2code.net, but they seem pretty kindergarten. Any > advice? I think with your experience, the best way to learn is just to start building projects, and pick up what you need as you go along. Maybe start with smaller project that uses a database backend of somekind. Especially if you're saying that the tutorial is kindergarten, than you should have no trouble to just start coding. I had about the same experience when I started to learn php, and that's the way I learned, BTW. RDB -- - /"\ ASCII Ribbon Campaign against HTML \ / email and proprietary format X attachments. / \ - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Learning PHP
Could anyone recommend a fast track for learning php for an experienced ColdFusion developer? I'm working my way through the tutorials on php.net and free2code.net, but they seem pretty kindergarten. Any advice?
Re: [PHP] Learning PHP
you have to know what the function prototypes mean, and it is very easy to understand: int function(string varname, mixed varname2[[, array varname3], int varname4]); means the function returns a variable of type integer, which is the same as int. Just two names for the same thing. if int is specified, it also can be a resource like a database connection handle or a file handle. then comes the function name. in this case it's "function". then the parameter list. in this case, the first two arguments are required, the last two arguments are optional, which is shown by the [] brackets.a paramater definition first shows the type and then the name of the parameter. string varname, mixed varname2[[, array varname3], int varname4]] string varname = first argument is required and has to be a string mixed varname2 = second argument is required and could be any type or a list of types. e.g.: some functions could be called with an array or a string. array varname3 = third parameter is optional and has to be an array int varname4 = forth parameter has to be an integer and is optional why is it [[, array varname3], int varname4] and not [, array varname3][, int varname4]]: because you cannot call php functionparameters by name. you can only call them by order. e.g.: function("varname" => 'string', "varname2" => 1, "varname4" => 4); is not valid. php doesn't provide the feature of calling functions by name. you can work around that, but it is not implemented directly. so if you want to call the function but leaving the third parameter out, you have to set a default value for this parameter: function('string', 1, array(), 4); this works. so you have to pass the third parameter to be able to pass the forth. thats why it reads [[, array varname3], int varname4]]. the third is required for the forth. That's also why it is not possible to place optional parameters left and required parameters right: int function([[, array varname3], int varname4]],string varname, mixed varname2); varname and varname2 are always required and we have to pass them to the function. But to be able to do that, we also have to pass varname3 and varname4. function('string', 1); will fail. it'll pass 'string' to varname3 and 1 to varname4, leaving varname and varname2 unset. But that all can be found in the manual. This was just a little help to get started. :) What i find additionally useful are the user contributed notes, which are quite helpful sometimes. Especially for newbies. Regards Michael "R" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 000801c20252$f859be40$0a6da8c0@lgwezec83s94bn">news:000801c20252$f859be40$0a6da8c0@lgwezec83s94bn... > Hey, > Welcome to PHP. > > I too am a newbie, I agree, php.net is too damn complex for a newbie, I > would suggest starting off on webmonkey as its really easy and has some > great examples for the beginner, then you can try to download the PHP manual > from php.net. > Nearly everyone I spoke to swears by the manual but I am using "PHP black > book" by peter moulding, coriolis and dreamtech publications, so far these 7 > chapters its really good, I do consult the manual a bit but am scared of it > :-) > > Hope that helped, > > -Ryan > > > > > > - Original Message - > From: "Darren Edwards" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 22, 2002 4:17 PM > Subject: [PHP] Learning PHP > > > > hi ppl i am learning PHP and was wondering if there is a good book or web > > site that i could learn ALOT from. Not PHP.net coz the documentation is > > just too complex there for a beginner. > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
The manual is excellent, once you ask the right question, or know where to look. It is a bit daunting as a newbie resource. However, the search engine does help in finding a specific function. The best way to get to that point is to work on some tutorials (even for things you don't need immediately), at places like: phpbuilder.com webmonkey.com sitepoint.com There's an exellent set of articles on sitepoint by Kevin, which have got me through the hard stuff, like sessions :) I think the guy who runs site point (Kevin Yank) has a great book, the first 4 chapters of which are published on the site. Good luck. Justin on 23/05/02 10:11 PM, r ([EMAIL PROTECTED]) wrote: > Hey, > Welcome to PHP. > > I too am a newbie, I agree, php.net is too damn complex for a newbie, I > would suggest starting off on webmonkey as its really easy and has some > great examples for the beginner, then you can try to download the PHP manual > from php.net. > Nearly everyone I spoke to swears by the manual but I am using "PHP black > book" by peter moulding, coriolis and dreamtech publications, so far these 7 > chapters its really good, I do consult the manual a bit but am scared of it > :-) > > Hope that helped, > > -Ryan > > > > > > - Original Message - > From: "Darren Edwards" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Wednesday, May 22, 2002 4:17 PM > Subject: [PHP] Learning PHP > > >> hi ppl i am learning PHP and was wondering if there is a good book or web >> site that i could learn ALOT from. Not PHP.net coz the documentation is >> just too complex there for a beginner. >> >> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
Hey, Welcome to PHP. I too am a newbie, I agree, php.net is too damn complex for a newbie, I would suggest starting off on webmonkey as its really easy and has some great examples for the beginner, then you can try to download the PHP manual from php.net. Nearly everyone I spoke to swears by the manual but I am using "PHP black book" by peter moulding, coriolis and dreamtech publications, so far these 7 chapters its really good, I do consult the manual a bit but am scared of it :-) Hope that helped, -Ryan - Original Message - From: "Darren Edwards" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, May 22, 2002 4:17 PM Subject: [PHP] Learning PHP > hi ppl i am learning PHP and was wondering if there is a good book or web > site that i could learn ALOT from. Not PHP.net coz the documentation is > just too complex there for a beginner. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Learning PHP
hi ppl i am learning PHP and was wondering if there is a good book or web site that i could learn ALOT from. Not PHP.net coz the documentation is just too complex there for a beginner. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Learning PHP
http://www.weberdev.com Sincerely berber Visit http://www.weberdev.com Today!!! To see where PHP might take you tomorrow. -Original Message- From: Victor Javier Martinez Lopez [mailto:[EMAIL PROTECTED]] Sent: Saturday, April 20, 2002 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] Learning PHP I'm started with PHP and I'm interested in find any place with some docs and example code. Can anyone help me? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
I suggest you buy a book called PHP Essentials by Julie C. Meloni. That's a great book for php beginners. It comes with a bunch of example code. It's really well written. Tyler Longren Captain Jack Communications www.captainjack.com [EMAIL PROTECTED] - Original Message - From: "Victor Javier Martinez Lopez" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, April 20, 2002 8:40 AM Subject: [PHP] Learning PHP I'm started with PHP and I'm interested in find any place with some docs and example code. Can anyone help me? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Learning PHP
I started here it was pretty good, then ofcourse I bought a thick ass book: http://www.mysql.com/articles/ddws/index.html R> >I'm started with PHP and I'm interested in find any place >with some docs and example code. Can anyone help me? > >Thanks in advance. > > --__-__-__ eat pasta type fasta -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Learning PHP
I'm started with PHP and I'm interested in find any place with some docs and example code. Can anyone help me? Thanks in advance.
RE: [PHP] Learning PHP
http://www.webdesigns1.com/php Jeff Oien > Can someone please make a list of the best places to learn PHP as I have 6 > weeks of school holidays and I want to put the m to good use (i have the > PHP reference guide from www.oreilly.com and i have the big ass document > files from www.php.net) > > > -legokiller666- > http://www.StupeedStudios.f2s.com > New address new site > > ICQ: 115852509 > MSN: [EMAIL PROTECTED] > AIM: legokiller666 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Learning PHP
O'Reilly book and PHP manual? That's the best you're going to get. (Others will recommend other books, but the O'Reilly one is great to start with) Good luck! -Original Message- From: Kyle Smith [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 25, 2001 9:06 PM To: [EMAIL PROTECTED] Subject: [PHP] Learning PHP Can someone please make a list of the best places to learn PHP as I have 6 weeks of school holidays and I want to put the m to good use (i have the PHP reference guide from www.oreilly.com and i have the big ass document files from www.php.net) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Learning PHP
Can someone please make a list of the best places to learn PHP as I have 6 weeks of school holidays and I want to put the m to good use (i have the PHP reference guide from www.oreilly.com and i have the big ass document files from www.php.net) -legokiller666- http://www.StupeedStudios.f2s.com New address new site ICQ: 115852509 MSN: [EMAIL PROTECTED] AIM: legokiller666
Re: [PHP] learning PHP from scratch
On Tue, Jul 17, 2001 at 04:55:11PM +1000, Jason Rennie wrote: > > > This approach worked pretty well with previous people i teached > > > PHP, but they already had some sort of programming background. > > > This guy hasn't. I find that he has some difficulties picking > > > it up. And I have some difficulties to further help him. > > > > Is he having problems with PHP, or database interaction with PHP? > > It sounds like he might be having problems with the basic programming > concepts. > > Are you teaching him and then getting the guy to actaully try some for > himself ? > > Start with something really basic, (hello world) and get him to do a > couple of dynamic things that dont use the database, then introduce the db > slowly. After the "hello world," I would have him print it 10 times. First let him hardcode 10 echoes, then show him how a for loop works. Since the concept is almost the same, once he understands the for loop, have him do it on his own with a while loop. To expand on that, you might have each iteration of the loop print in different formatting, e.g. , , . Then have him build an array of strings, and use a for loop to create an (un)ordered list from the array . Then have him build a 2D array and create a table from it. The next step might be to have him create an HTML form that accepts a number from a user in a text box. The user enters a number, and submitting calls a PHP script that prints "hello world" as many times as the input specified. Just some suggestions, hope they help, Matt -- Matt Garman, [EMAIL PROTECTED] "I'll tip my hat to the new constitution, Take a bow for the new revolution Smile and grin at the change all around, Pick up my guitar and play Just like yesterday, Then I'll get on my knees and pray..." -- Pete Townshend/The Who, "Won't Get Fooled Again" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] learning PHP from scratch
> > This approach worked pretty well with previous people i teached > > PHP, but they already had some sort of programming background. > > This guy hasn't. I find that he has some difficulties picking > > it up. And I have some difficulties to further help him. > > Is he having problems with PHP, or database interaction with PHP? It sounds like he might be having problems with the basic programming concepts. Are you teaching him and then getting the guy to actaully try some for himself ? Start with something really basic, (hello world) and get him to do a couple of dynamic things that dont use the database, then introduce the db slowly. Give him some hands on programming task to get started with, and rpovide him with a good book on PHP and encourage him to experiment a bit. Jason -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] learning PHP from scratch
I am not sure how easy it would be to learn PHP from scratch without any prior programming experience... In my case, knowing C and HTML very well made learning PHP easy as pie... I think both are great starting points for someone who wants to do PHP well. -Original Message- From: Jason Murray [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 17, 2001 12:28 AM To: 'Raphael Steenbergen'; [EMAIL PROTECTED] Subject: RE: [PHP] learning PHP from scratch > This approach worked pretty well with previous people i teached > PHP, but they already had some sort of programming background. > This guy hasn't. I find that he has some difficulties picking > it up. And I have some difficulties to further help him. Is he having problems with PHP, or database interaction with PHP? Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] learning PHP from scratch
> This approach worked pretty well with previous people i teached > PHP, but they already had some sort of programming background. > This guy hasn't. I find that he has some difficulties picking > it up. And I have some difficulties to further help him. Is he having problems with PHP, or database interaction with PHP? Jason -- Jason Murray [EMAIL PROTECTED] Web Developer, Melbourne IT "Work now, freak later!" -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] learning PHP from scratch
Hi, I am teaching a fellow worker PHP. He is, like other 'students' I had working on a small project with database interaction. This approach worked pretty well with previous people i teached PHP, but they already had some sort of programming background. This guy hasn't. I find that he has some difficulties picking it up. And I have some difficulties to further help him. Communication somewhat gets stuck, since he does not know the basic concepts and terminology. Does anybody have ideas or suggestions how to teach PHP to someone without any previous programming experience? Easy documents and tutorials dealing with the basic concepts and terminology? Any help appreciated. Kind regards, Raphael Steenbergen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]