I'm trying to redirect a page using javascript output using php. The problem I'm having is passing the ampersand as you can see below.
Input
$url = 'number=1&id='.$usrid->id;
echo "<script type='text/javascript'>
window.location = 'directory?$url';
</script>";
Output
The above return on browser address bar this:
http://www.domain.com/directory/?number=1#038;id=190