<?php if ($_GET[’kw’]) {echo htmlentities($_GET[’kw’]);} else {echo ucwords(â€Your Original Info Hereâ€);} ?> Code (markup): This simple php code returns the T_STRING error. Can anyone give me some pointers as to why this could be happening? cheers,
<?php if ($_GET['kw']) { echo htmlentities($_GET['kw']); } else { echo ucwords('Your Original Info Here'); } ?> PHP:
I was at one point too friend You are quite welcome. Also, big tip I like to give... Use single quotes so that you can use double quotes in strings without having to backslash. Like this: Bad: $var = "My nickname is \"phpl33t\"."; Good: $var = 'My nickname is "phpl33t".'; or... mysql_query("SELECT * FROM `users` WHERE `username`=\"$username\"") or die(mysql_error()); Good: mysql_query('SELECT * FROM `users` WHERE `username`="'.$username.'"') or die(mysql_error()); PHP: