Getting php error

Discussion in 'PHP' started by Shakil, Oct 10, 2010.

  1. #1
    I m getting error what will be correct ?

    Plz see code by clicking Reply With QUOTE otherwise whole code is not shown....


    <td class=\"srbb\"><textarea class=\"srbh\" rows=\"3\" onmouseover=\"this.select();\" onfocus=\"this.select();\" onkeydown=\"return false;\">/index.php?ref=$username][​IMG]</textarea></td>


    Thanks
     
    Last edited: Oct 10, 2010
    Shakil, Oct 10, 2010 IP
  2. mastermunj

    mastermunj Well-Known Member

    Messages:
    687
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Using braces around variables when its referanced inside string is always better.

    I believe following shall solve the error. If it doesn't kindly share more details about it.

    
    <td class=\"srbb\"><textarea class=\"srbh\" rows=\"3\" onmouseover=\"this.select();\" onfocus=\"this.select();\" onkeydown=\"return false;\">[URL=http://www.{$settings[domain_name]}/index.php?ref={$username}][IMG]http://www.{$settings[domain_name]}/banners/banner.php?bb=1&usr={$username}[/IMG][/URL]</textarea></td>
    
    PHP:
     
    mastermunj, Oct 11, 2010 IP
  3. Shakil

    Shakil Greenhorn

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    @mastermunj

    Yes :) It solve the problem... No syntax error!

    Thanks a lot :D
     
    Shakil, Oct 11, 2010 IP