php-general Digest 25 Apr 2009 13:36:05 -0000 Issue 6086

2009-04-25 Thread php-general-digest-help
php-general Digest 25 Apr 2009 13:36:05 - Issue 6086 Topics (messages 291960 through 291969): Re: SMTP mail server 291960 by: Adam Williams 291961 by: kranthi 291962 by: Ron Piggott 291963 by: Ron Piggott 291964 by: kranthi 291966 by: Manuel

php-general Digest 26 Apr 2009 03:38:45 -0000 Issue 6087

2009-04-25 Thread php-general-digest-help
php-general Digest 26 Apr 2009 03:38:45 - Issue 6087 Topics (messages 291970 through 291980): Re: inexplicable behaviour 291970 by: PJ Re: PHP CLI vs WebServed 291971 by: Simon 291972 by: Daniel Brown 291977 by: Daniel Brown Change color of anything in

Re: [PHP] I need ideas for things to code

2009-04-25 Thread tedd
At 7:00 PM -0400 4/24/09, Andrew Hucks wrote: I've been coding PHP for about a year, and I'm running out of things to code that force me to learn new things. If you have any suggestions, I'd greatly appreciate it. Andrew: Here's an idea. Go through the php manuals and make small examples of

[PHP] PHP CLI vs WebServed

2009-04-25 Thread Simon
Hi there, I've been using PHP for a very long time now, a few years ago developing webapplications with apache and mysql, now and for a few years using mostly the CLI (mostly as a replacement of all other scripting languages available on linux, sh, pearl, etc...). However, I'm building a

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Richard Heyes
Hi, ... Never done this, but could you set environment variables, which would then be picked up by PHP (and stuffed in $_ENV)? -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate

Re: RES: [PHP] inexplicable behaviour

2009-04-25 Thread PJ
Oh, the code works ok. Without the $Count1 = $Count++; it does not work. If you are saying it should be $Count+; it does not matter. That's what's weird. I think it would work no matter what I put in it could be $Count1 = $Countmeoutandcrap; and I think it would still work. The similar behaviour

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Simon
Thanks for the reply Richard! Never done this, but could you set environment variables, which would then be picked up by PHP (and stuffed in $_ENV)? This seems like a good idea, if i mix this with the popen() idea, i wouldnt need /dev/shm or any files at all then... but the problem remains

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Daniel Brown
On Sat, Apr 25, 2009 at 10:14, Simon turne...@gmail.com wrote: Hopefully, I'm looking for a way that would not require any hacking of the PHP files that are currently working with other webservers... Perhaps you may want to consider hacking PHP itself. From memory, one place you may want

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Marc Steinert
Andrew Hucks wrote: If I have something like $string = 'hello there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like font color=colorhello/font there. Try $string = preg_replace('/(.*?)/', 'font color=color\\1/font', $string); Greetings

[PHP] Change color of anything in double/single quotes

2009-04-25 Thread Andrew Hucks
If I have something like $string = 'hello there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like font color=colorhello/font there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Phpster
On Apr 25, 2009, at 13:40, Andrew Hucks andrewphpm...@gmail.com wrote: If I have something like $string = 'hello there'; (the word hello is in double quotes, if you can't see it), how would I output it as something like font color=colorhello/font there. -- PHP General Mailing List

Re: [PHP] I need ideas for things to code

2009-04-25 Thread Charles Harvey
This was a surprisingly good idea that works for me, as I haven't coded in about 3 years and need to get my hand back in. Trying to make use of one idea led to several others. Thanks, tedd! Charles On Sat, Apr 25, 2009 at 4:54 AM, tedd tedd.sperl...@gmail.com wrote: At 7:00 PM -0400 4/24/09,

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Daniel Brown
Replying this back on the list, unchanged and without any additions from me yet. On Sat, Apr 25, 2009 at 14:09, Simon turne...@gmail.com wrote:    Perhaps you may want to consider hacking PHP itself.  From memory, one place you may want to start looking is the php_filter_get_storage()

Re: [PHP] Change color of anything in double/single quotes

2009-04-25 Thread Daniel Brown
On Sat, Apr 25, 2009 at 13:50, Marc Steinert li...@bithub.net wrote: $string = preg_replace('/(.*?)/', 'font color=color\\1/font', $string); Close, but I'd also recommend dropping in a 'Us' modifier so that it is `U`ngreedy and `s`pans lines. ?php $regexp = '/(.*?)/Us'; ? -- /Daniel

[PHP] Formating Numbers

2009-04-25 Thread Gary
I cant seem to get this to work for me. I want the number to be formated to money (us, 2 decimal points). I have gone through manual, tried money_format, number_format, along with setting the variable, but I cant seem to get it to work. I'm sure it is something simple I am missing. Thanks

Re: [PHP] Formating Numbers

2009-04-25 Thread kranthi
pl post the desired result, the functions if u r trying to get $ 34,567.25 i dont understand y this is not working for u... http://php.net/manual/en/function.number-format.php#88486 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: RES: [PHP] inexplicable behaviour

2009-04-25 Thread kranthi
if $Count1 is never referenced after this, then certainly this assignment operation is redundent. but assignment is not the ONLY operation of this statement. if u hav not noticed a post increment operator has been used which will affect the value of $Count as well, and this operation is required

RE: [PHP] Formating Numbers

2009-04-25 Thread Warren Vail
As an alternative you might consider; $number = sprintf(%01.2f,$number); There was a time many years ago you had to be careful doing math with floats. Test, test and test some more. Warren -Original Message- From: kranthi [mailto:kranthi...@gmail.com] Sent: Saturday, April 25,