Unexpected T_STRING
Moderator: General Moderators
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
I'm sure if you look over it you'll seeadamb10 wrote:I have syntax highlighting but I have no idea what the colors mean.
Look at ours:
Code: Select all
$variable_is_blue = "string is red"; //comments are orange
/*
Syntax is green (i.e. =, *, &, [ ] () )
Keywords are green (i.e. function, while, do, for, foreach, if, else)
*/
if ($foo) echo "foo is here!";either way his escaping had problems... and i thinkd11wtq wrote:That's not the problem. This is (it can be seen clearly from the highlighter).
Should be:Code: Select all
if($row['links != "images"){ echo '<a href="'.$website.'">[website]</a>'; } else {
Code: Select all
if($row['links'] != "images"){ echo '<a href="'.$website.'">[website]</a>'; } else {
Code: Select all
"html here".$var."more html"Code: Select all
'html"'.$var.'"more html'Code: Select all
if($cond){
//do stuff
}I have elected to use PEAR's way even though the phpBB way would be easier. I cant believe how much nicer my code is now...
Code: Select all
if ($aim != ""){
if ($row['links'] != "images") {
echo " <a href=\"aim:goim?screenname=$aim&message=Hello\">[aim]</a>";
} else {
echo '<a href="aim:goim?screenname='.$aim.'&message=Hello"><img src="'.$row2['aim'].'" border="0"></a>';
}
}