eregi() is the go... whilst the documentation is pretty thin on the actual
expressions, '^' checks for the pattern at the begining of a string.

<?

if(eregi('^324', $string)) {
    // 
    // it did begin with "324"
    //
} else {
    //
    // it didn't
    //
}

?>

Justin French
--------------------
Creative Director
http://Indent.com.au
--------------------



on 30/04/02 10:03 PM, David Orn Johannsson ([EMAIL PROTECTED]) wrote:

> Is ther any function that I could use to check if a string beguins wiht
> a certin set of numbers, like
> if string starts_w ô324ö {
> do some stuff;
> }
> 
> Regards, David
> 
> <http://www.atom.is/> ------------------------
> DavÝ­ Írn Jˇhannssson
> Vefforritari
> ------------------------
> Atˇmst÷­in hf.
> Gar­astrŠti 37
> 101 ReykjavÝk
> ------------------------
> sÝmi: 595-3643
> fax: 595-3649
> <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED]
> <http://www.atom.is/> http://www.atom.is
> ------------------------
> 
> 


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

Reply via email to