[PHP] scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
hi all, I have this function: function preg_array($pattern, $array, $r_array) { global $match; global $r_array; foreach ($array as $key = $value) { if (preg_match($pattern, $value,$match)) { $GA=array_slice($match,1); break; } } return array ($GA,

[PHP] scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
Hi all, I have this code ( but you already know it ;-) : function preg_array($pattern, $array, $r_array) { global $match; global $r_array; foreach ($array as $key = $value) { if (preg_match($pattern, $value,$match)) { $r_array=array_slice($match,1); break;

[PHP] Re: scope and return array( ); problems

2007-04-18 Thread Yvan Strahm
On 4/18/07, Yvan Strahm [EMAIL PROTECTED] wrote: Hi all, I have this code ( but you already know it ;-) : function preg_array($pattern, $array, $r_array) { global $match; global $r_array; foreach ($array as $key = $value) { if (preg_match($pattern, $value,$match

Re: [PHP] crontab, PHP and MACOSX

2007-04-04 Thread Yvan Strahm
On 3/28/07, Chris [EMAIL PROTECTED] wrote: There is a lot of require_once(' ') in the script and if i am not in the correct folder the script won't work. That is something php related ;) Change your require to something like this: require(dirname(__FILE__) . '/other_file_name.php'); --

Re: [PHP] usage of flock

2007-03-26 Thread Yvan Strahm
On 3/23/07, Richard Lynch [EMAIL PROTECTED] wrote: On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop

Re: [PHP] usage of flock

2007-03-26 Thread Yvan Strahm
On 3/23/07, Myron Turner [EMAIL PROTECTED] wrote: Richard Lynch wrote: On Fri, March 23, 2007 7:52 pm, Yvan Strahm wrote: I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes

[PHP] usage of flock

2007-03-23 Thread Yvan Strahm
Hello All, I am confused with the flock function and its usage. I have jobs which are stored in a database, these jobs are run by a series of job_runners scripts but sometimes the job_runners stop ( server or php crash-down). So i put a job_controller in crontab to check regularly if the