Announcement

Collapse
No announcement yet.

Trouble with PHP variables

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Trouble with PHP variables

    say i have this in a database table:

    Code:
    " & ' *&^"^%"
    
    {$this->menu}
    <br />
    {$this->top5}
    {$this->recent}
    <br />
    {$this->search}
    <br />
    {$this->cred}
    <br />
    how can i substitute in the variables?

    currently im using:
    Code:
      eval("echo \"$layout->page\";");
    but that prevents me from using any "s :unsure:

    TIA

  • #2
    You can't replace the variables any other way that I know of, but you can use single quotes (') instead of double quotes ("), or you can use double quotes by using \\\"

    Comment


    • #3
      i used preg_replace in the end and it worked

      ive decided just to use


      return <<<EOF

      eeh(**&$^£*&

      EOF;

      Comment

      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X