I'm not use with ? : etc coding with PHP, i barely know how it's called, I'd like to know as well, but most of all trying to find what's wrong in my code. Basically all i want is swap the css ID if the page is index.php or not I appreciate any help echo ' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Manele » cauta si downloadeaza manele doar la manele.me</title> <link rel="stylesheet" href="/style.css" type="text/css" /> </head> <body> <div id="content"> <h1 class="normal">manele.me » locul de unde poti downloada manele gratis</h1> [COLOR=RED][B]<a href="#"><div id="'. ($GLOBALS['pagename']="index.php") ? 'header' : 'header-permalink' .'">Manele.me</div></a>[/B][/COLOR] '; Code (markup): I get the following error: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home/manele/public_html/header.php on line 27 Parse error: syntax error, unexpected '"' in /home/manele/public_html/header.php on line 27 Code (markup):
It's called ternary operator. And use commas to "split" the string, instead of the periods. Or wrap the whole ternary operation into parenthesis.