[PHP] best way for PHP page

2008-01-01 Thread Alain Roger
Hi, i would like to improve my coding quality when i use PHP code and for that i would request your help. in my web developer experience, i have to confess that i've never succeeded in spliting PHP code from HTML code. i mean that all my web pages consist of PHP code mixed with HTML code (for ren

[PHP] Re: read email

2008-01-01 Thread Manuel Lemos
Hello, on 12/30/2007 06:19 PM Yui Hiroaki said the following: > HI! > > I am trying to access qmail with php. > > Why! > Because I would like to read mail who someone send an email me to qmail. > > If anyone knows the code, please send me the code. The easiest way to to associate a POP3 mailbox t

Re: [PHP] variable substitution

2008-01-01 Thread jekillen
On Jan 1, 2008, at 3:48 PM, James Ausmus wrote: On Jan 1, 2008 2:17 PM, jekillen <[EMAIL PROTECTED]> wrote: Hello again; I have two variables declared in the global scope of a script. $string_a = 'stuff $string_b and more stuff'; $string_b = ''; One is a string with a reference for substitutio

Re: [PHP] variable substitution

2008-01-01 Thread jekillen
On Jan 1, 2008, at 3:31 PM, Richard Lynch wrote: On Tue, January 1, 2008 4:17 pm, jekillen wrote: Hello again; I have two variables declared in the global scope of a script. $string_a = 'stuff $string_b and more stuff'; $string_b = ''; One is a string with a reference for substitution to the o

Re: [PHP] Re: foreach questions

2008-01-01 Thread jekillen
On Jan 1, 2008, at 3:34 PM, Richard Lynch wrote: Hit send too soon. Sorry! On Tue, January 1, 2008 2:05 pm, jekillen wrote: Several questions: How long can an index be in an associative array? (the indexes I use in this array are 32 character hashes) As far as I know, it can be as big as y

Re: [PHP] variable substitution

2008-01-01 Thread James Ausmus
On Jan 1, 2008 2:17 PM, jekillen <[EMAIL PROTECTED]> wrote: > Hello again; > I have two variables declared in the global scope of a script. > $string_a = 'stuff $string_b and more stuff'; > $string_b = ''; > One is a string with a reference for substitution to the other > string which is empty. > I

Re: [PHP] Re: foreach questions

2008-01-01 Thread Richard Lynch
Hit send too soon. Sorry! On Tue, January 1, 2008 2:05 pm, jekillen wrote: >>> Several questions: >>> How long can an index be in an associative array? (the indexes I >>> use >>> in this array are 32 character hashes) As far as I know, it can be as big as your RAM will hold... >>> Can it start

Re: [PHP] foreach questions

2008-01-01 Thread Richard Lynch
-> is the Object operator. You want => which is used in foreach On Tue, January 1, 2008 1:47 pm, jekillen wrote: > Hello; > I have this section of code: > > @include('tmp_index.php'); > foreach($index as $key -> $value) >{ > if($input == $key) > { >

Re: [PHP] variable substitution

2008-01-01 Thread Richard Lynch
On Tue, January 1, 2008 4:17 pm, jekillen wrote: > Hello again; > I have two variables declared in the global scope of a script. > $string_a = 'stuff $string_b and more stuff'; > $string_b = ''; > One is a string with a reference for substitution to the other > string which is empty. > In the proce

Re: [PHP] variable substitution

2008-01-01 Thread Casey
On Jan 1, 2008 2:17 PM, jekillen <[EMAIL PROTECTED]> wrote: > Hello again; > I have two variables declared in the global scope of a script. > $string_a = 'stuff $string_b and more stuff'; > $string_b = ''; > One is a string with a reference for substitution to the other > string which is empty. > I

[PHP] variable substitution

2008-01-01 Thread jekillen
Hello again; I have two variables declared in the global scope of a script. $string_a = 'stuff $string_b and more stuff'; $string_b = ''; One is a string with a reference for substitution to the other string which is empty. In the processing body of the script are if/if else blocks. In these block

[PHP] Re: foreach questions

2008-01-01 Thread Martin Jerga
Hello, the problem is in this part of code $key -> $value This notation means that you are trying to access property $value on the object $key. Just replace it with $key => $value and you will get the result as expected. Martin J jekillen wrote / napísal(a): Hello; I have this section of co

Re: [PHP] Try{} Catch()

2008-01-01 Thread Martin Alterisio
2007/12/31, Richard Lynch <[EMAIL PROTECTED]>: > > On Sun, December 23, 2007 3:50 pm, Martin Alterisio wrote: > > It's not supposed to be practical, it's just a way to handle errors. > > You > > shouldn't rely on try/catch for algorithm implementation. > > > > You create exceptions for errors and u

[PHP] Re: foreach questions

2008-01-01 Thread jekillen
On Jan 1, 2008, at 11:59 AM, Martin Jerga wrote: Hello, the problem is in this part of code $key -> $value This notation means that you are trying to access property $value on the object $key. Just replace it with $key => $value and you will get the result as expected. Martin J Thank y

Re: [PHP] foreach questions OT

2008-01-01 Thread Børge Holen
On Tuesday 01 January 2008 20:47:18 jekillen wrote: > Hello; > I have this section of code: > > @include('tmp_index.php'); > foreach($index as $key -> $value) >{ > if($input == $key) > { >$target_file = $value; > } >

[PHP] foreach questions

2008-01-01 Thread jekillen
Hello; I have this section of code: @include('tmp_index.php'); foreach($index as $key -> $value) { if($input == $key) { $target_file = $value; } } And I am getting this error: Fatal error: Cannot access empty property in /

Re: [PHP] About search engine usability

2008-01-01 Thread Børge Holen
On Tuesday 01 January 2008 19:21:09 Richard Lynch wrote: > On Mon, December 31, 2007 5:19 pm, Jim Webber wrote: > > Hello I'm building a website with a search engine. > > Do you think it is more usable if the search interface had a search > > button? or do you think it will be more convenient to no

Re: [PHP] About search engine usability

2008-01-01 Thread Richard Lynch
On Mon, December 31, 2007 5:19 pm, Jim Webber wrote: > Hello I'm building a website with a search engine. > Do you think it is more usable if the search interface had a search > button? or do you think it will be more convenient to not have button > to > let the users just push "enter" to search. >

Re: [PHP] PHP5 Speed Issues

2008-01-01 Thread Arvids Godjuks
Hi everyone! Generaly author of the first e-mail is right. Ofcource, crawling over the code and getting out of it a few milliseconds off doesn't make it worth, but you can learn what is good and what is bad and write your code correctly from the start. Why not to use foreach ($data as &$value) if