i am sorta new to PHP, i mostly use HTML. I have made a PHP script. What the code should do is display a youtube video when i put the code. like this
"website.com/youtube.php?v=1010111" It would display the youtube video but
I keep on getting the error :
Parse error: syntax error, unexpected '<' in [location]/index.php on
line 7
Here is the code:
if( $_GET["v"])
{
$matches = $_GET['v'];
echo "Welcome ". $_GET['v']. "
";
exit();
}
?>
Answer
You have to write ?>
when you want to stop writing PHP code.
At line 7, ou have , just write
?>
before that html tag.
No comments:
Post a Comment