php-general Digest 7 Apr 2012 14:37:39 -0000 Issue 7764

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

php-general Digest 7 Apr 2012 14:37:39 - Issue 7764

Topics (messages 317474 through 317481):

Re: image inventoryer
317474 by: David OBrien
317475 by: Jim Giner
317476 by: David OBrien
317477 by: Tedd Sperling
317479 by: tamouse mailing lists
317480 by: Jim Giner

Re: foreach
317478 by: tamouse mailing lists

Re: Watch out for automatic type casting
317481 by: Bogdan Ribic

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 Fri, Apr 6, 2012 at 8:34 AM, Jim Giner jim.gi...@albanyhandball.comwrote:

 Kirk Bailey kbai...@howlermonkey.net wrote in message
 news:4f7e5d2f.3050...@howlermonkey.net...
  jim, I am a novice at this language as I said.
 

 Then you are taking on too big of a task.

 When I decided to pick up some web programming skills I bought a $50
 book/manual on learning PHP and another on MySQL.  I read them - cover to
 cover.  Then I made up simple tasks to develop in order to LEARN how it's
 actually done.  Sounds like you not only want someone to program it for
 you,
 but probably help you implement it too.  Sure - I or someone with time on
 their hands - could reply back with a couple hundred lines of code and give
 you your answer.  Then what would you have gained?

 Hey - I gave you the outline of how this goal of yours could be
 accomplished.  No need for your own pseudo-code at this point.  Take mine
 and go do some research!  Have fun!  Then come back for clarification on
 what you're doing wrong once you have some actual code written.

 
  And were people this nice to you when YOU asked beginner questions?
 
 When I asked beginner questions, it was AFTER I had written something and
 ran into a roadblock.  NOT before I had set pen to paper.  You're asking
 how
 to get to California without having consulted a map yet.  This site will be
 there for you when you have a problem - don't worry.  Me included, not that
 my input is that worthy.



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


I googled php show images in folder and lo and behold  the first was was
a script almost exactly what you are wanting to do
---End Message---
---BeginMessage---
David OBrien dgobr...@gmail.com wrote in message 
news:CAF=yD_06vDEHLP-nyEJxUNt6nHexA42X90U5-6+MBzc0=tc...@mail.gmail.com...

 I googled php show images in folder and lo and behold  the first was was
 a script almost exactly what you are wanting to do

Damn - now the OP missed a golden opportunity to do some research!  :) 


---End Message---
---BeginMessage---
On Apr 6, 2012 9:51 AM, Jim Giner jim.gi...@albanyhandball.com wrote:

 David OBrien dgobr...@gmail.com wrote in message
 news:CAF=yD_06vDEHLP-nyEJxUNt6nHexA42X90U5-6+MBzc0=tc...@mail.gmail.com...
 
  I googled php show images in folder and lo and behold  the first was
was
  a script almost exactly what you are wanting to do
 
 Damn - now the OP missed a golden opportunity to do some research!  :)



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


It's been my experience if they haven't even used google to see what
premade scripts are available to do something similar then the research
ain't gonna happen.

They'd just post on ee or another forum where they could get the answer
easier
---End Message---
---BeginMessage---
On Apr 5, 2012, at 10:26 PM, Kirk Bailey wrote:

 I need a page that will live in a directory and list all image files in 
 there. That is, the page has
 img src=./foo.typeP
 tags emitted in it's structure, one per file in the directory with a saught 
 file type- .png, .gif, .jpg, you get the idea.
 this should use relative addressing so once the tool is built I can use it in 
 other directories as is.
 
 Now ai am still a novice at p[hp, how can I do this ?
 
 -- 
 end
 
 Very Truly yours,
 - Kirk Bailey,


Kirk:

That will be a good exercise for you. If you want help, then show us something 
where you did something other than ask for the code.

For example, show us *your* code (or attempt) to list all the files in a 
directory. That's pretty simple. After you do that, then we can move on to the 
next step.

Please realize we are not here to write code for you  but rather to help you 
with *your* code.

Cheers,

tedd

_
tedd.sperl...@gmail.com
http://sperling.com
---End Message---
---BeginMessage---
On Thu, Apr 5, 2012 at 10:04 PM, Kirk Bailey kbai...@howlermonkey.net wrote:
 jim, I am a novice at this language as I said.
 And were people this nice to you when YOU asked beginner questions?

When I ask beginner questions, I spend time doing 

php-general Digest 8 Apr 2012 03:36:04 -0000 Issue 7765

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

php-general Digest 8 Apr 2012 03:36:04 - Issue 7765

Topics (messages 317482 through 317483):

Re: Watch out for automatic type casting
317482 by: Maciek Sokolewicz

image inventoryer
317483 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 07-04-2012 16:37, Bogdan Ribic wrote:

This is *not* typecasting at all, this is assignment of a result of
boolean operator, and it boils down to operator precedence.

It's equivalent to this code:

$b = $x == 11;

in the part that right side of equation sign is calculated first, then
assigned to lvalue. In effect, you wrote this:

$pos = (strpos($sText, test) !== FALSE);

You would often use something like this in code:

$isSame = $x == $y;

which would put a boolean into $isSame, not put value of $x and then
compare it.


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

---End Message---
---BeginMessage---

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?


--
end

Very Truly yours,
 - Kirk Bailey,
   Largo Florida

   kniht
  +-+
  | BOX |
  +-+
   think

---End Message---