How do I get specific data from a table value ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • xFUNKYFACE
    New Member
    • Jun 2010
    • 2

    How do I get specific data from a table value ?

    I got a table named "language" were I store all the text from my website (http://www.ultimespace.net/menu/). So in a page I called "sort.php" I actually transfert all the values from the user selected language in this variable "$language_data ". Now I have no problem getting values from specific colums when doing this :

    echo $language_data['profile'];

    No my problem is that I created a DropDownMenu generator using a table "menu" and so I want the name of the DropDownMenu to set with the language table. So I tried this :

    $name = "copyrights ";
    $name = $language_data['"'.$name.'" '];

    But it doesn't work I still get a SQL error :S

    Can anyone help me with this ??
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    it’s $language_data[$name];. besides, what is the SQL error you get?

    Comment

    • xFUNKYFACE
      New Member
      • Jun 2010
      • 2

      #3
      Originally posted by Dormilich
      it’s $language_data[$name];. besides, what is the SQL error you get?
      Well thanks Dormilich it was actually quite a dum mistake and so now my code works so thanks

      Comment

      Working...