sorry, It´s only a test!!
Thanks, helps a lot!!
[]´s Felipe
> "Felipe Desiderati" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> >I need a simple function that takes a string and formats
> > with a generic mask. Like this example above:
> >
> >$string1 = &
> Felipe Desiderati wrote:
> > try this:
> >
> > if (ereg("^[0-9]+$", $_POST["var_int"))
> > echo "is int";
>
> That's not the best regexp. It doesn' take into account negative
> integers and isn't there a [[:nume
try this:
if (ereg("^[0-9]+$", $_POST["var_int"))
echo "is int";
[]´s Felipe
- Original Message -
From: "Jean-Christian IMbeault" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 11, 2003 9:44 PM
Subject: [PHP] How to find if a string is an integer?
> I would like
ot;#.###.###-#", $string1); // --> Returns 1.234.567-8
echo format_string ("##/##/", $string1); // --> Returns 11/06/2003
Does anybody here have an idea to how to do this?
Thanks, and sorry again for my english.
______
5 matches
Mail list logo