--- Susan Ator <[EMAIL PROTECTED]> wrote:
> It works beautifully. My only question is there a way to pass a
> variable to the ereg? In other words:
> 
>     if( ereg( '^<TO>(.*)$', $line, $matches ) )
> 
> would become:
> 
>     if( ereg( '^<$var>(.*)$', $line, $matches ) )
> 
> I've tried doing eval but that was a no go.

That first argument is just a string, so you can generate it any way you want.
When you use single quotes, the string is considered to be literal text. Use
double quotes if you want $var to be evaluated.

Hope that helps.

Chris

=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to