note 7900 deleted from function.ereg by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:21:14 +0000 |
| Subject: | note 7900 deleted from function.ereg by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20118@lists.php.net to get a copy of this message | ||
I had some problems embedding the the value of a variable into my match string inside the quotes, so
I found that assembling the string with concatenation operators worked better. This might be my own
(newbie) ignorance of PHP's variable interpolation inside of quotes, but in case it's
helpful to someone else:
This didn't work:
ereg("^$prefix_([^_]+)_(.+)$", $subject, $results);
But this did:
ereg ("^" . $prefix . "_([^_]+)_(.+)$", $subject, $results)