RE: [PHP-DB] Echo with extra characters
| From: | Boaz Yahav | Date: | Mon, 20 Jan 2003 11:56:57 +0000 |
| Subject: | RE: [PHP-DB] Echo with extra characters | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-24965@lists.php.net to get a copy of this message | ||
In case the string is always "Language" you can use : $mainarea =
substr($mainarea,2,8);
If not, than you need Regexps
berber
-----Original Message-----
From: Alex Francis [mailto:afrancis@camerondesign.co.uk]
Sent: Wednesday, January 08, 2003 4:41 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Echo with extra characters
I have the following code in my page as a header.
<?
if ($mainarea=="Language")
{
header("Location:add_5-14_material.php?mainarea=$mainarea");
}
else
{
}
?>
When I echo $mainarea I get \'Language\'. I think it is something to
do
with my quotation marks but need some help.
How do I get rid of the ' and \ so that I am left with my variable?.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php