Jump to content

Syntax Error


Recommended Posts

Parse error: syntax error, unexpected '=' in /home/.... on line 75

 

 

<?php=$r['name'];?><?php=$and?>

 

if i remove this it will give me the same error for other code, and so long till the page will have all the scripts removed.

 

from what researches i did, some ppl talked about php version, but on heliohost is 5 which is the right one.

some others said to remove the "=" or the code. removing the "=" it will give me an error about variable, and removing the code.. well i explained u above.

 

anyone know smth about this ? :)

Link to comment
Share on other sites

<?php= is a short cut syntax that is not supported by all servers. Try

 

echo "$r['name']";
echo "$and";

 

if that doesn't work try leaving out the single quotes

 

echo "$r[name];
echo "$and";

 

php.net says to use them but I get errors with them all the time.

Link to comment
Share on other sites

Should be:

 

<?=$r['name'];?><?=$and?>

 

NOT this:

 

<?php=$r['name'];?><?php=$and?>

 

I normally use it something like this:

 

<input type="text" name="url" value="<?=$_POST[url];?>">

 

@Hairy DJ, we can't use

  only the simple code tag.

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...