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 e

[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 project

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 (w

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 wa

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 t

Re: [PHP] PHP CLI vs WebServed

2009-04-25 Thread Daniel Brown
On Sat, Apr 25, 2009 at 10:14, Simon 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 to start looking

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 "hello" there. Try $string = preg_replace('/"(.*?)"/', '"\\1"', $string); Greetings from Germany Marc Steinert -- Sync

[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 "hello" 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 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 "hello" there. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

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 wrote: > At 7:00 PM -0400 4/24/09, Andrew Hucks wrote: >

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 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() function, the

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 wrote: > > $string = preg_replace('/"(.*?)"/', '"\\1"', > $string); Close, but I'd also recommend dropping in a 'Us' modifier so that it is `U`ngreedy and `s`pans lines. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/

[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 for

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 fo

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 2

Re: [PHP] How can I detect an exception without using try/catch?

2009-04-25 Thread kranthi
a POSSIBLE work round. see if u can use http://in2.php.net/manual/en/function.error-get-last.php or http://in2.php.net/manual/en/reserved.variables.phperrormsg.php but they are not working as expected with xdebug. use them in the __destruct function to check for an uncaught exception alternativel

[PHP] Help with scandir()

2009-04-25 Thread Deivys Delgado Hernandez
Hi, I'm having problems when i try to use the function scandir() in a Novell Netware Volumen or a Windows Shared Folder they both are mapped as a windows network drive, so i suppose i could access them as local drive, but i can't. instead i receive this message: Warning: scandir(R:\) [function.