check to see if a string contains sudden elements
| From: | Reinhart Viane | Date: | Sun, 06 Mar 2005 13:32:13 +0000 |
| Subject: | check to see if a string contains sudden elements | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-210087@lists.php.net to get a copy of this message | ||
I have a page which gets the id of a user from the url.
$_GET[id]
Now this id can have two forms:
Normal: page.php?id=1
Not so normal: page.php?id=whatever|1
I can explode the second string so I only have the number (1). Explode ("|",
$_GET(id))
But this command fails my query in case we have a normal value
Is there a way to check the $_GET(id) to see if there is a | in it and in
that case explode it?
Thx in advance.
Reinhart