title: PHP Parse error: syntax error, unexpected T_GLOBAL, expecting T_STRING
body: <p>I'm trying to move a blog from blogger to wordpress using a plugin with the code below. Here's the error message : </p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected T_GLOBAL, expecting T_STRING in /home/content/[HIDE]/wpbeginner-blogger.php on line 8</p>
  </blockquote>
  
  <p>The code is :</p>
  
  <pre><code>  {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
  {\fonttbl\f0\fswiss\fcharset0 Helvetica;}
  {\colortbl;\red255\green255\blue255;}
  \margl1440\margr1440\vieww8980\viewh7500\viewkind0
  \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural
  
  \f0\fs24 \cf0 &lt;?php\
   global $wpdb;\
   $old_url = $_GET['q'];\
   if ($old_url != "") \{\
     $permalink = explode("blogspot.ca", $old_url);\
     $q = "SELECT guid FROM $wpdb-&gt;posts LEFT JOIN $wpdb-&gt;postmeta ".\
          "ON ($wpdb-&gt;posts.ID = $wpdb-&gt;postmeta.post_id) WHERE ".\
          "$wpdb-&gt;postmeta.meta_key='blogger_permalink' AND ".\
          "$wpdb-&gt;postmeta.meta_value='$permalink[1]'";\
    $new_url = $wpdb-&gt;get_var($q)? $wpdb-&gt;get_var($q) : "/";\
    header ("HTTP/1.1 301 Moved Permanently");\
    header("Location: $new_url");\
   \}\
  ?&gt;\
  \
  }
  </code></pre>
  
  <p>Anyone knows how to fix this?</p>