Hi,
I have a string like this, read from an html file: ' VALUE=16'
The value could be any number. I am trying to get that number.
I have this so far, i was hoping someone might tell me how to get that
number:
?php
$handle = fopen(page.php, r);
while (!feof($handle)) {
$buffer .=
Nick Wilson wrote:
Hi,
I have a string like this, read from an html file: ' VALUE=16'
The value could be any number. I am trying to get that number.
I have this so far, i was hoping someone might tell me how to get that
number:
?php
$handle = fopen(page.php, r);
while (!feof($handle)) {
Nick,
Nick wrote:
I have a string like this, read from an html file: ' VALUE=16'
The value could be any number. I am trying to get that number.
If you have that exact string and you want to extract just the number,
then a simple regex to delete all non-numeric characters should
suffice.
I have
From: Marek Kilimajer [EMAIL PROTECTED]
$handle = fopen(page.php, r);
while (!feof($handle)) {
$buffer .= fgets($handle, 4096);
}
fclose($handle);
file_get_contents() could be helpful here, too...
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
* and then Marek Kilimajer declared
Im not very good at regex, is there an function that would help me?
(couldnt see one...)
preg_match('/value\s*=\s*([0-9]+)/i', $buffer, $result);
print (Result:br /.$result[1]);
Marek, you're a star ;-)
I *hate* having to ask someone to do my
5 matches
Mail list logo