# Parse error: syntax error, unexpected T\_ENCAPSED\_AND\_WHITESPACE, expecting T\_STRING

**URL:** <https://forum.kirupa.com/t/parse-error-syntax-error-unexpected-t-encapsed-and-whitespace-expecting-t-string/251454>\
**Category:** programming\
**Created:** [February 8, 2008, 5:25pm UTC](https://forum.kirupa.com/t/parse-error-syntax-error-unexpected-t-encapsed-and-whitespace-expecting-t-string/251454 "2008-02-08T17:25:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![k77](https://avatars.discourse-cdn.com/v4/letter/k/c67d28/32.png) [@k77](https://forum.kirupa.com/u/k77)\
**Post date:** [February 8, 2008, 5:25pm UTC](https://forum.kirupa.com/t/parse-error-syntax-error-unexpected-t-encapsed-and-whitespace-expecting-t-string/251454/1 "2008-02-08T17:25:56Z")

</div>

```auto
$con = mysql_connect("localhost"," *****","********");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db(" ******* _car", $con);

$result = mysql_query("SELECT * FROM 'users' WHERE 'userid' = $user");

while($row = mysql_fetch_array($result))
  {
    echo "<b>Loyal Since ";
   **49** echo "$row['date_joined'];";
    echo "</b>";
  }

mysql_close($con);

```

I have no idea what the hell is wrong, I just want to display a date for each user saying “Loyal since 1st January” etc.

**Parse error** : syntax error, unexpected T\_ENCAPSED\_AND\_WHITESPACE, expecting T\_STRING or T\_VARIABLE or T\_NUM\_STRING in **/home/public\_html/** _/index.php_\* on line **49**
