php-general Digest 9 Apr 2012 00:54:28 -0000 Issue 7766

2012-04-08 Thread php-general-digest-help

php-general Digest 9 Apr 2012 00:54:28 - Issue 7766

Topics (messages 317484 through 317488):

Re: image inventoryer
317484 by: tamouse mailing lists
317486 by: Kirk Bailey
317487 by: Tedd Sperling

Re: Watch out for automatic type casting
317485 by: tamouse mailing lists

php books
317488 by: Kirk Bailey

Administrivia:

To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net

To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net

To post to the list, e-mail:
php-gene...@lists.php.net


--
---BeginMessage---
On Sat, Apr 7, 2012 at 10:35 PM, Kirk Bailey kbai...@howlermonkey.net wrote:
 html
 head
 titleImage inventory of this directory/title
 style TYPE=text/css
 body { margin-left: 10; margin-right: 10%; }
 body {background-attachment:fixed;}
 A:link, A:visited,  A:active { text-decoration:none; }
 A:hover { text-decoration:underline; }
 .justify{text-align:justify;}
 .center{text-align:center;}
 /style
 /head
 body bgcolor=#A0A0A0 TEXT=BLACK LINKS=BLUE
 CENTERThis page inventories the contents of this directory and lists all
 image files in order- as
 the computer determines such matters. Here is the full inventory.
 hr align=center
 P
 ?php
 foreach (glob(*.*) as $filename) {
    echo 'img src='.$filename.''.br\n$filename\nP\n;
 }
 ?
 /body/html


 This works nicely. copied code from online manual, chainsaw editing to fit,
 superglue in the spare parts needed and it lists them all and composes
 proper img links to display on the inventory page. NOW I have the tool i
 needed; can someone else put this to good work?

Well, congrats on a first somewhat useful program. All I have to say
now is: you have a long way to go.
---End Message---
---BeginMessage---

Thank you!
Not QUITE the first; I have used snippets and small routines for a 
while; however I did not know how to do this in php.


Turns out there are at least 2 methods: glob, and an iteration of 
the directory with readdir() to build up an array, then one by one 
print the elements in the array. In python this is not hard. 
Iteration in python is somewhat different- not to mention getting 
used to do blocks. Being so used to snake charming, learning a new 
way means getting used to different procedures.


On 4/8/2012 2:18 AM, tamouse mailing lists wrote:

On Sat, Apr 7, 2012 at 10:35 PM, Kirk Baileykbai...@howlermonkey.net  wrote:

html
head
titleImage inventory of this directory/title
style TYPE=text/css
body { margin-left: 10; margin-right: 10%; }
body {background-attachment:fixed;}
A:link, A:visited,  A:active { text-decoration:none; }
A:hover { text-decoration:underline; }
.justify{text-align:justify;}
.center{text-align:center;}
/style
/head
body bgcolor=#A0A0A0 TEXT=BLACK LINKS=BLUE
CENTERThis page inventories the contents of this directory and lists all
image files in order- as
the computer determines such matters. Here is the full inventory.
hr align=center
P
?php
foreach (glob(*.*) as $filename) {
echo 'img src='.$filename.''.br\n$filename\nP\n;
}
?
/body/html


This works nicely. copied code from online manual, chainsaw editing to fit,
superglue in the spare parts needed and it lists them all and composes
proper img links to display on the inventory page. NOW I have the tool i
needed; can someone else put this to good work?

Well, congrats on a first somewhat useful program. All I have to say
now is: you have a long way to go.

---End Message---
---BeginMessage---
Kirk:

Okay, you took the first step. Now please review this:

?php
foreach (glob(images/*.jpg) as $filename)
{
   echo(img src=\$filename\br$filename brbr);
}
?

Note:

1. This example does not put in all the embedded formatting shown in your 
example. What you did was simply bad form -- you should learn css as well. 
Also, you don't need to place the code within a bunch of html -- it will work 
as-is.

2. I always want my students to place images in an image directory -- the above 
conforms to that.

3. The example also shows how to separate the jpg's from other files in the 
directory.


So, where do you want to go now?

Cheers,

tedd


_
tedd.sperl...@gmail.com
http://sperling.com





---End Message---
---BeginMessage---
On Sat, Apr 7, 2012 at 1:55 PM, Maciek Sokolewicz
maciek.sokolew...@gmail.com wrote:
 On 07-04-2012 16:37, Bogdan Ribic wrote:
[snip]

 Bogdan,
 you are reviving a thread over a week old, and repeating what 4 other people
 have already stated. Please don't do that, it just results in
 mailinglist-noise.

 - Tul

plus, you top-posted /piling-on
---End Message---
---BeginMessage---
Revisiting said dead horse, it's interesting there is no clear  
consensus of opinion about what is the best book to use to learn 
php. Generally, you get several people chiming in talking about the 
website. Now the website is the bomb indeed, BUT IT'S NOT A BOUND 

Re: [PHP] image inventoryer

2012-04-08 Thread tamouse mailing lists
On Sat, Apr 7, 2012 at 10:35 PM, Kirk Bailey kbai...@howlermonkey.net wrote:
 html
 head
 titleImage inventory of this directory/title
 style TYPE=text/css
 body { margin-left: 10; margin-right: 10%; }
 body {background-attachment:fixed;}
 A:link, A:visited,  A:active { text-decoration:none; }
 A:hover { text-decoration:underline; }
 .justify{text-align:justify;}
 .center{text-align:center;}
 /style
 /head
 body bgcolor=#A0A0A0 TEXT=BLACK LINKS=BLUE
 CENTERThis page inventories the contents of this directory and lists all
 image files in order- as
 the computer determines such matters. Here is the full inventory.
 hr align=center
 P
 ?php
 foreach (glob(*.*) as $filename) {
    echo 'img src='.$filename.''.br\n$filename\nP\n;
 }
 ?
 /body/html


 This works nicely. copied code from online manual, chainsaw editing to fit,
 superglue in the spare parts needed and it lists them all and composes
 proper img links to display on the inventory page. NOW I have the tool i
 needed; can someone else put this to good work?

Well, congrats on a first somewhat useful program. All I have to say
now is: you have a long way to go.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Watch out for automatic type casting

2012-04-08 Thread tamouse mailing lists
On Sat, Apr 7, 2012 at 1:55 PM, Maciek Sokolewicz
maciek.sokolew...@gmail.com wrote:
 On 07-04-2012 16:37, Bogdan Ribic wrote:
[snip]

 Bogdan,
 you are reviving a thread over a week old, and repeating what 4 other people
 have already stated. Please don't do that, it just results in
 mailinglist-noise.

 - Tul

plus, you top-posted /piling-on

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] image inventoryer

2012-04-08 Thread Kirk Bailey

Thank you!
Not QUITE the first; I have used snippets and small routines for a 
while; however I did not know how to do this in php.


Turns out there are at least 2 methods: glob, and an iteration of 
the directory with readdir() to build up an array, then one by one 
print the elements in the array. In python this is not hard. 
Iteration in python is somewhat different- not to mention getting 
used to do blocks. Being so used to snake charming, learning a new 
way means getting used to different procedures.


On 4/8/2012 2:18 AM, tamouse mailing lists wrote:

On Sat, Apr 7, 2012 at 10:35 PM, Kirk Baileykbai...@howlermonkey.net  wrote:

html
head
titleImage inventory of this directory/title
style TYPE=text/css
body { margin-left: 10; margin-right: 10%; }
body {background-attachment:fixed;}
A:link, A:visited,  A:active { text-decoration:none; }
A:hover { text-decoration:underline; }
.justify{text-align:justify;}
.center{text-align:center;}
/style
/head
body bgcolor=#A0A0A0 TEXT=BLACK LINKS=BLUE
CENTERThis page inventories the contents of this directory and lists all
image files in order- as
the computer determines such matters. Here is the full inventory.
hr align=center
P
?php
foreach (glob(*.*) as $filename) {
echo 'img src='.$filename.''.br\n$filename\nP\n;
}
?
/body/html


This works nicely. copied code from online manual, chainsaw editing to fit,
superglue in the spare parts needed and it lists them all and composes
proper img links to display on the inventory page. NOW I have the tool i
needed; can someone else put this to good work?

Well, congrats on a first somewhat useful program. All I have to say
now is: you have a long way to go.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] image inventoryer

2012-04-08 Thread Tedd Sperling
Kirk:

Okay, you took the first step. Now please review this:

?php
foreach (glob(images/*.jpg) as $filename)
{
   echo(img src=\$filename\br$filename brbr);
}
?

Note:

1. This example does not put in all the embedded formatting shown in your 
example. What you did was simply bad form -- you should learn css as well. 
Also, you don't need to place the code within a bunch of html -- it will work 
as-is.

2. I always want my students to place images in an image directory -- the above 
conforms to that.

3. The example also shows how to separate the jpg's from other files in the 
directory.


So, where do you want to go now?

Cheers,

tedd


_
tedd.sperl...@gmail.com
http://sperling.com






--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] php books

2012-04-08 Thread Kirk Bailey
Revisiting said dead horse, it's interesting there is no clear  
consensus of opinion about what is the best book to use to learn 
php. Generally, you get several people chiming in talking about the 
website. Now the website is the bomb indeed, BUT IT'S NOT A BOUND 
BOOK! So that's a terrific answer to a totally different question.


It's interesting really; it suggests there is a wide range of 
perspectives and mindsets about wha is the best way to come to 
understand php. Possibly this suggests something about the general 
mindset of the php community- wide ranging individualism?


--
end

Very Truly yours,
 - Kirk Bailey,
   Largo Florida

   kniht
  +-+
  | BOX |
  +-+
   think


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php books

2012-04-08 Thread Jason Pruim


On Apr 8, 2012, at 8:53 PM, Kirk Bailey kbai...@howlermonkey.net wrote:

 Revisiting said dead horse, it's interesting there is no clear  consensus of 
 opinion about what is the best book to use to learn php. Generally, you get 
 several people chiming in talking about the website. Now the website is the 
 bomb indeed, BUT IT'S NOT A BOUND BOOK! So that's a terrific answer to a 
 totally different question.
 
 It's interesting really; it suggests there is a wide range of perspectives 
 and mindsets about wha is the best way to come to understand php. Possibly 
 this suggests something about the general mindset of the php community- wide 
 ranging individualism?

By our nature as programmers we all have very different ways to look at things. 
And if we don't like the way things are being done with the current tools we 
change it... We fix it  

That being said I've been considering a project that would take sample code and 
explain why it dos what it does... Make it reviewed by the big wigs here and 
possibly go as far as printing it... But definitely an ebook type thing.

Anyone interested in helping on a project like that?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] php books

2012-04-08 Thread Jason Pruim


On Apr 8, 2012, at 9:15 PM, Jason Pruim li...@pruimphotography.com wrote:

 
 
 On Apr 8, 2012, at 8:53 PM, Kirk Bailey kbai...@howlermonkey.net wrote:
 
 Revisiting said dead horse, it's interesting there is no clear  consensus of 
 opinion about what is the best book to use to learn php. Generally, you get 
 several people chiming in talking about the website. Now the website is the 
 bomb indeed, BUT IT'S NOT A BOUND BOOK! So that's a terrific answer to a 
 totally different question.
 
 It's interesting really; it suggests there is a wide range of perspectives 
 and mindsets about wha is the best way to come to understand php. Possibly 
 this suggests something about the general mindset of the php community- wide 
 ranging individualism?
 
 By our nature as programmers we all have very different ways to look at 
 things. And if we don't like the way things are being done with the current 
 tools we change it... We fix it  
 
 That being said I've been considering a project that would take sample code 
 and explain why it dos what it does... Make it reviewed by the big wigs here 
 and possibly go as far as printing it... But definitely an ebook type thing.
 
 Anyone interested in helping on a project like that?

And I just realized I hijacked your thread... I apologize! My brain has not 
started up from the weekend yet If there is interest I'll start a specific 
thread for it! :)

*slaps his own wrist*


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php