Re: [PHP] php string syntax question with html

2010-03-10 Thread Rene Veerman
$var = 'bla'.$var2.'doh'.$var3['index'].'argh'.$var4[$var4index]; is so much more readable in any editor that does syntax highlighting, and parses quicker too. On Thu, Mar 11, 2010 at 1:15 AM, David Mehler wrote: > Hello, > I've got what is probably a very simple question, probably something > h

Re: [PHP] Execution order of PHP

2010-03-10 Thread Rene Veerman
You may not care about this, but from a readability perspective, i think relying on $client->system being as special as you describe, is not very readable. If i'd had to read code that does what you describe, i'd be much happier to see a datastructure be passed as was suggested elsewhere in this t

Re: [PHP] Array Search Problem

2010-03-10 Thread Rene Veerman
(almost) all the tricks are in the comments of the help page for a function, on php.net but all functions accept only a given (and usually documented) set of parameter(type)s, so you'll probably have to prepare the var, or even call the function in a loop, outputting to yet another descriptively n

[PHP] Re: Array Search Not Working?

2010-03-10 Thread clancy_1
On Wed, 10 Mar 2010 09:52:30 -0500, aj...@alumni.iu.edu (Alice Wei) wrote: > >Hi, > > I have two arrays here that I have combined into a new array, as shown here: > >$from = explode("-", $from); >$change = explode("-",$change); >$new_array = array_combine($from,$change); > >I then tried reading i

Re: [PHP] php string syntax question with html

2010-03-10 Thread Paul M Foster
On Thu, Mar 11, 2010 at 01:17:57AM +, Ashley Sheridan wrote: > > You're using single quotes in your string, so you can't have PHP parse > the string for variables to extend into their corresponding values. If > you wish to do that, use either double-quoted strings or heredoc/nowdoc > syntax

Re: [PHP] php string syntax question with html

2010-03-10 Thread Ashley Sheridan
On Wed, 2010-03-10 at 19:33 -0500, Adam Richardson wrote: > Try this: > > ' .'/wp-content/themes/themestyle/white.css" rel="stylesheet" type="text/css" > />'; > > On Wed, Mar 10, 2010 at 7:15 PM, David Mehler wrote: > > > Hello, > > I've got what is probably a very simple question, probably so

Re: [PHP] php string syntax question with html

2010-03-10 Thread Adam Richardson
Try this: ''; On Wed, Mar 10, 2010 at 7:15 PM, David Mehler wrote: > Hello, > I've got what is probably a very simple question, probably something > having to do with quotes single vs. double, but the answer is > frustrating elusive, I keep getting a syntax error. > I'm trying to customize a wo

[PHP] php string syntax question with html

2010-03-10 Thread David Mehler
Hello, I've got what is probably a very simple question, probably something having to do with quotes single vs. double, but the answer is frustrating elusive, I keep getting a syntax error. I'm trying to customize a wordpress theme a friend sent me. We're both using apache as web server and php5, b

Re: [PHP] Division by 0

2010-03-10 Thread Daniel Egeberg
On Wed, Mar 10, 2010 at 23:44, Dmitry Ruban wrote: > Hi Jochem, > > Jochem Maas wrote: >> >> Op 3/10/10 6:23 PM, Joseph Thayne schreef: >>> >>> Looks to me like you are closing your form before you put anything in >>> it.  Therefore, the loan_amount is not set making the value 0.  Follow >>> the m

Re: [PHP] Division by 0

2010-03-10 Thread Dmitry Ruban
Hi Jochem, Jochem Maas wrote: Op 3/10/10 6:23 PM, Joseph Thayne schreef: Looks to me like you are closing your form before you put anything in it. Therefore, the loan_amount is not set making the value 0. Follow the math, and you are dividing by 1-1. Change this line: to: this is a XS

Re: [PHP] Division by 0

2010-03-10 Thread Daniel Egeberg
On Wed, Mar 10, 2010 at 22:27, Jochem Maas wrote: > Op 3/10/10 6:23 PM, Joseph Thayne schreef: >> Looks to me like you are closing your form before you put anything in >> it.  Therefore, the loan_amount is not set making the value 0.  Follow >> the math, and you are dividing by 1-1. >> >> Change t

Re: [PHP] Division by 0

2010-03-10 Thread Gary
gt;> >># Term length of the loan, in years. >>$termLength =($_POST['loan_term']); >> >># Number of payments per year. >>$paymentsPerYear = 12; >> >># Payment iteration >>$paymentNumber =($_POST['loan_term']); >

Re: [PHP] Execution order of PHP

2010-03-10 Thread Jochem Maas
Op 3/10/10 1:29 PM, Auke van Slooten schreef: > Hi, > > In a hobby project I'm relying on the order in which the following piece > of PHP code is executed: > > $client->system->multiCall( > $client->methodOne(), > $client->methodTwo() > ); > > Currently PHP always resolves $client->system (a

Re: [PHP] Division by 0

2010-03-10 Thread Jochem Maas
ars. >>$termLength =($_POST['loan_term']); >> >># Number of payments per year. >>$paymentsPerYear = 12; >> >># Payment iteration >>$paymentNumber =($_POST['loan_term']); >> >># Perform preliminary

Re: [PHP] Execution order of PHP

2010-03-10 Thread Daniel Egeberg
On Wed, Mar 10, 2010 at 14:41, Bob McConnell wrote: > From: Auke van Slooten > >> In a hobby project I'm relying on the order in which the following > piece >> of PHP code is executed: >> >> $client->system->multiCall( >>    $client->methodOne(), >>    $client->methodTwo() >> ); >> >> Currently PH

Re: [PHP] Division by 0

2010-03-10 Thread Joseph Thayne
$periodicPayment, $balance, $monthlyInterest); # Close table print ""; ?> __ Information from ESET Smart Security, version of virus signature database 4932 (20100310) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Division by 0

2010-03-10 Thread Gary
t " Payment NumberBalance PaymentInterestPrincipal "; # Call recursive function amortizationTable($paymentNumber, $periodicPayment, $balance, $monthlyInterest); # Close table print ""; ?> __ Information from E

RE: [PHP] Array Search Problem

2010-03-10 Thread Alice Wei
> > did you read the help for those functions on php.net? Yes, I found a "recursive" way to find out the "index" like I wanted, by doing something like $from = explode("-", $from); $state_colors= explode("-", $state_colors); $change = explode("-",$change); $count = count($new_array); $i=0; f

Re: [PHP] Array Search Problem

2010-03-10 Thread Rene Veerman
did you read the help for those functions on php.net? On Wed, Mar 10, 2010 at 4:12 PM, Alice Wei wrote: > > Hi, > >  I have the code as shown in the following that I am trying to create the > image of based on the file loaded into the file and additional edits. The > problem here appears to be

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
> > I'm still a little foggy on what you're doing, but doing, but does this > help? > > $from = explode("-", $from); > $state_colors = explode("-", $state_colors); > $change = explode("-", $change); > > $old = array_combine($from, $state_colors); > $new = array_combine($from, $change); > > //s

[PHP] Re: Array Search Not Working?

2010-03-10 Thread Shawn McKenzie
Alice Wei wrote: > From: aj...@alumni.iu.edu > To: nos...@mckenzies.net > CC: php-general@lists.php.net > Subject: RE: Array Search Not Working? > Date: Wed, 10 Mar 2010 11:21:26 -0500 I'm still a little foggy on what you're doing, but doing, but does this help? $from = explode("-", $from); $stat

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
From: aj...@alumni.iu.edu To: nos...@mckenzies.net CC: php-general@lists.php.net Subject: RE: Array Search Not Working? Date: Wed, 10 Mar 2010 11:21:26 -0500 > Date: Wed, 10 Mar 2010 10:09:54 -0600 > From: nos...@mckenzies.net > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > Sub

[PHP] RE: Array Search Not Working?

2010-03-10 Thread Alice Wei
> Date: Wed, 10 Mar 2010 10:09:54 -0600 > From: nos...@mckenzies.net > To: aj...@alumni.iu.edu > CC: php-general@lists.php.net > Subject: Re: Array Search Not Working? > > Alice Wei wrote: > > Hi, > > > > I have two arrays here that I have combined into a new array, as shown > > here: > > >

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Andrew Ballard wrote: I'm not sure you would want to assign null to $client->system. After all, __set() might not be defined. I agree with Rob here. If order is really crucial, then call the statements in the correct order: system; /** * You should add some handling here to make sure that *

[PHP] Re: Array Search Not Working?

2010-03-10 Thread Shawn McKenzie
Alice Wei wrote: > Hi, > > I have two arrays here that I have combined into a new array, as shown here: > > $from = explode("-", $from); > $change = explode("-",$change); > $new_array = array_combine($from,$change); > > I then tried reading it from a file and do string matches, trying to find

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Andrew Ballard : > On Wed, Mar 10, 2010 at 9:54 AM, Bruno Fajardo wrote: > [snip] >> 2010/3/10 Auke van Slooten : >>> This is not what I meant. I should perhaps mention that it's an xml-rpc >>> client and the method calls are remote method calls. The multiCall method >>> gathers multiple

Re: [PHP] Execution order of PHP

2010-03-10 Thread Andrew Ballard
On Wed, Mar 10, 2010 at 9:54 AM, Bruno Fajardo wrote: [snip] > 2010/3/10 Auke van Slooten : >> This is not what I meant. I should perhaps mention that it's an xml-rpc >> client and the method calls are remote method calls. The multiCall method >> gathers multiple method calls into a single request

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Auke van Slooten : > Bruno Fajardo wrote: >> >> 2010/3/10 Auke van Slooten >>> >>> Hi, >>> >>> In a hobby project I'm relying on the order in which the following piece >>> of PHP code is executed: >>> >>> $client->system->multiCall( >>>  $client->methodOne(), >>>  $client->methodTwo() >>

Re: [PHP] Execution order of PHP

2010-03-10 Thread Robert Cummings
Auke van Slooten wrote: Bob McConnell wrote: From: Auke van Slooten In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() ); Think about it from the parser's point of v

[PHP] Array Search Not Working?

2010-03-10 Thread Alice Wei
Hi, I have two arrays here that I have combined into a new array, as shown here: $from = explode("-", $from); $change = explode("-",$change); $new_array = array_combine($from,$change); I then tried reading it from a file and do string matches, trying to find out the "key" using the array_sea

RE: [PHP] Execution order of PHP

2010-03-10 Thread Bob McConnell
From: Sándor Tamás > 2010.03.10. 14:41 keltezéssel, Bob McConnell írta: >> From: Auke van Slooten >> >>> In a hobby project I'm relying on the order in which the following >>> >> piece >> >>> of PHP code is executed: >>> >>> $client->system->multiCall( >>> $client->methodOne(), >>>

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Bob McConnell wrote: From: Auke van Slooten In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() ); Think about it from the parser's point of view. It has to evaluate

Re: [PHP] Execution order of PHP

2010-03-10 Thread Ashley Sheridan
On Wed, 2010-03-10 at 15:20 +0100, Sándor Tamás wrote: > > 2010.03.10. 14:41 keltezéssel, Bob McConnell írta: > > From: Auke van Slooten > > > > > >> In a hobby project I'm relying on the order in which the following > >> > > piece > > > >> of PHP code is executed: > >> > >> $client

Re: [PHP] Execution order of PHP

2010-03-10 Thread Sándor Tamás
2010.03.10. 14:41 keltezéssel, Bob McConnell írta: From: Auke van Slooten In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() ); Currently PHP always

Re: [PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Bruno Fajardo wrote: 2010/3/10 Auke van Slooten Hi, In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() ); Can't you call the methods $client->methodOne() and $client->met

[PHP] Array Search Problem

2010-03-10 Thread Alice Wei
Hi, I have the code as shown in the following that I am trying to create the image of based on the file loaded into the file and additional edits. The problem here appears to be that no matter what value I have in the $distance_to_destination variable, it does not affect any changes on the

RE: [PHP] Execution order of PHP

2010-03-10 Thread Bob McConnell
From: Auke van Slooten > In a hobby project I'm relying on the order in which the following piece > of PHP code is executed: > > $client->system->multiCall( >$client->methodOne(), >$client->methodTwo() > ); > > Currently PHP always resolves $client->system (and executes the __get on >

Re: [PHP] Execution order of PHP

2010-03-10 Thread Bruno Fajardo
2010/3/10 Auke van Slooten > > Hi, > > In a hobby project I'm relying on the order in which the following piece of > PHP code is executed: > > $client->system->multiCall( >  $client->methodOne(), >  $client->methodTwo() > ); > > Currently PHP always resolves $client->system (and executes the __ge

[PHP] Execution order of PHP

2010-03-10 Thread Auke van Slooten
Hi, In a hobby project I'm relying on the order in which the following piece of PHP code is executed: $client->system->multiCall( $client->methodOne(), $client->methodTwo() ); Currently PHP always resolves $client->system (and executes the __get on $client) before resolving the arguments

Re: [PHP] Mail Function In PHP

2010-03-10 Thread Michael Kubler
Having worked at a decent sized, respectable ISP with 100,000+ customers sending email via Iron Ports (email scanners), even they would get put on a blacklist on a monthly basis. Hell it wouldn't surprise me if Gmail's SMTP servers got put on a black list at some point. There's seemingly hundred

Re: [PHP] Re: Anyone good with multiple SSL on Apache?

2010-03-10 Thread Jochen Schultz
Thanks Per, well here is a short translation of this article: http://www.tech-nerds.de/blog/2009/02/apache2-mit-mehreren-ssl-virtualhosts/ If you havn't installed apache2-threaded-dev: You need the current verion of gnutls (download from gnu.org) Download, unpack, compile and install as usual. T

Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-10 Thread Per Jessen
Per Jessen wrote: > Daniel Egeberg wrote: > >> On Mon, Mar 8, 2010 at 23:21, Skip Evans >> wrote: >>> D'oh! >>> >>> ...and I suppose there is just no way around that, eh? >>> >>> Skip >> >> You can use SNI, but it's not supported by all web servers and >> browsers. >> >> http://en.wikipedia.or

Re: [PHP] Re: Anyone good with multiple SSL on Apache?

2010-03-10 Thread Per Jessen
Per Jessen wrote: > Jochen Schultz wrote: > >> AFAIK Apache 2 doesn't support virtual hosts for SSL. >> > > I think it does now - there was even a c't article on the topic not > long ago. I'll see if I can find it. http://www.heise.de/kiosk/archiv/ct/2009/23/174_kiosk (download for a fee)

Re: [PHP] Anyone good with multiple SSL on Apache?

2010-03-10 Thread Per Jessen
Daniel Egeberg wrote: > On Mon, Mar 8, 2010 at 23:21, Skip Evans > wrote: >> D'oh! >> >> ...and I suppose there is just no way around that, eh? >> >> Skip > > You can use SNI, but it's not supported by all web servers and > browsers. > > http://en.wikipedia.org/wiki/Server_Name_Indication > I

Re: [PHP] Re: Anyone good with multiple SSL on Apache?

2010-03-10 Thread Per Jessen
Jochen Schultz wrote: > AFAIK Apache 2 doesn't support virtual hosts for SSL. > I think it does now - there was even a c't article on the topic not long ago. I'll see if I can find it. /Per -- Per Jessen, Zürich (-4.0°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi