[PHP] Perl find and replace in PHP

2007-03-26 Thread rluckhurst
Hi All I am porting some perl to PHP and have struck a small snag. The perl script has quite a few substitutions that take place so data can be fed into a html page. The script uses the following perl syntax $html = `cat search_results.html`; $html =~ s/%Accom/$accom/g; As I understand perl tha

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake I am getting nothing at all. Regards Richard > What is the result your getting? > > Jake > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> Sent: Saturday, March 24, 2007 11:57 PM >> To: Jake McHenry >> Cc: php-general@lists.php.net >> Subject: RE

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake I tried that and got the same result. Regards Richard > What if you put $temp = $data->legs->leg[$k]['legId']; > And then put that into $legrow[$temp]; > > Do you have anything in $temp? > > Jake > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >> S

RE: [PHP] Array Question

2007-03-24 Thread rluckhurst
Hi Jake Thanks for the answer. That is what I had in my example that did not work. I had tried that and then wondered how I might access that key. I have tried $legrow["number"]; where number is a value I know to be one of the legId's. Is this correct? Regards Richard > $legrow["$data->leg

[PHP] Array Question

2007-03-24 Thread rluckhurst
Hi All I am having a bit of trouble with PHP arrays and would appreciate some help. I currently have the following piece of code $count=count($data->legs->leg); $k=0; while($k < $count) { $legrow[$k]=$data->legs->leg[$k]['legId'].$VM.$data->