* 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:".$result[1]);
Marek, you're a star ;-)
I *hate* having to ask someone to do
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
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 hav
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:
$handle = fopen("page.php", "r");
while (!feof($handle)) {
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:
".$result);
?>
Im not very good at regex, is there an function that would help m
gt; - Original Message -
> From: Stig-Ørjan Smelror <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, August 31, 2001 9:35 AM
> Subject: [PHP] help with strings...
>
>
> > Hei all.
> >
> > I've got this string, $string = "te
$GLOBALS[substr($string, 0, 1)]
or :
$tmp = substr($string, 0, 1);
${$tmp} = 'add whatever value you want';
- Original Message -
From: Stig-Ørjan Smelror <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 31, 2001 9:35 AM
Subject: [PHP] help with
Hei all.
I've got this string, $string = "test"; and I want to make a $t; out of
$string.
Is this possible?
I tried ${substr($string, 0, 1)}, but that didn't work ;)
Any help appreciated.
TIA.
--
Stig-Ørjan Smelror
Systemutvikler
Linux Communications AS
Sandakerveien 48b
Box 1801 - Vika
N
8 matches
Mail list logo