preg_match_all(/^('\$(.*)')/si, $fcontents,$matches);
^^
you don't allow any character between start of the string and single quote.
preg_match_all(/^.*('\$(.*)')/si, $fcontents,$matches);
Hatem Ben wrote:
I'm asking again the same question, coz i guess my question wasn't clear.
Right then.
Here's what I have done, and it works:
===Contents of query.txt===
?php
$fcontents = QUERY
select * FROM `table` where id='$value' order by name
QUERY;
?
===End Contents of query.txt===
Then:
===Contents of parse.php===
?php
include('query.txt');
It's not working also
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Hatem Ben [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 5:23 PM
Subject: Re: [PHP] Vars inside an sql query [Regular expression question] -
Again
preg_match_all
]
Cc: Marek Kilimajer [EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 4:35 PM
Subject: Re: [PHP] Vars inside an sql query [Regular expression question] -
Again
It's not working also
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Hatem Ben [EMAIL PROTECTED]
Cc
an sql query [Regular expression question] -
Again
It's not working also
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Hatem Ben [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 5:23 PM
Subject: Re: [PHP] Vars inside an sql query [Regular expression
5 matches
Mail list logo