Jump to content

unexpected '<' error


pmonty

Recommended Posts

$left .= <div class="quotepost"><div class="textdiv"><q class="quotetext">.$row['quote'].</q></div><p class="quoteauthor">-.$row['author'].</p></div><br/>; 

on this line i am getting :Parse error: syntax error, unexpected '<' on line 91 not sure what it is because my tags look fine. Any ideas would be helpful? thanks

Link to comment
Share on other sites

you're forgetting quotes at the beginning of the string, right where the error says, at the < before div. You need to put all that text in quotes.

$left .= '<div class="quotepost"><div class="textdiv"><q class="quotetext">' . $row['quote'] . '</q></div><p class="quoteauthor">'  . $row['author']. '</p></div><br/>';

  • Like 1
Link to comment
Share on other sites

  • 3 weeks later...
$left .= <div class="quotepost"><div class="textdiv"><q class="quotetext">.$row['quote'].</q></div><p class="quoteauthor">-.$row['author'].</p></div><br/>; 

on this line i am getting :Parse error: syntax error, unexpected '<' on line 91 not sure what it is because my tags look fine. Any ideas would be helpful? thanks

Or if you want to do with double quotes
$left .= "<div class=\"quotepost\"><div class=\"textdiv\"><q class=\"quotetext\">" . $row['quote'] . "</q></div><p class=\"quoteauthor\">-" . $row['author'] . "</p></div><br/>";

Link to comment
Share on other sites

Or if you want to do with double quotes
$left .= "<div class=\"quotepost\"><div class=\"textdiv\"><q class=\"quotetext\">" . $row['quote'] . "</q></div><p class=\"quoteauthor\">-" . $row['author'] . "</p></div><br/>";

You shouldn't use double quotes for a string like that, that's ugly.Mind you, you shouldn't really have HTML in a string either.EDIT: yey ipb sucks Edited by callumacrae
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...