RE: [PHP] Re: check to see if a string contains sudden elements

2005-03-06 Thread Reinhart Viane
$ret = explode('|', $_GET['id']); if(count($ret) > 1) { $id = $ret[1]; } else { $id = $ret[0]; } Suberb, This indeed did the trick. Aargh I hate when things are this simple and I just can't seem to find them... Thx! -- PHP General Mailing List (http://www.php.net/) To unsubscri

[PHP] Re: check to see if a string contains sudden elements

2005-03-06 Thread M. Sokolewicz
Reinhart Viane wrote: 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