Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6736009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:04:47+00:00 2026-05-26T11:04:47+00:00

//Setting up variables $server = **********; $username = **********; $password = ******; $database =

  • 0

        //Setting up variables
        $server = "**********";
        $username = "**********";
        $password = "******";
        $database = "*******";

        //Connecting to Server
        mysql_connect($server, $username, $password)or die (mysql_error());
        //echo "Connected to MySQL";

        //Connecting to database
        mysql_select_db($database) or die (mysql_error());
        //echo "Connected to my Database";

        //variable selecting the reach_codes table
        $result = mysql_query("SELECT * FROM reach_Codes");


        //set variable to store column arrays
        $fault_Codes = array();
        //while loop fetching all rows
        while(false !== ($row = mysql_fetch_assoc($result)))
        {
            $fault_Codes[] = $row['fault_ID'];
        }

        echo $fault_Codes[1];



        mysql_close();
    ?>

Hi Everyone so I am relatively new to web programming, but I program in c++, so I wanted to make this website to display some fault code information since I work on forklifts at work just to make my life easier. I now how arrays work, I just can’t find information on how to use those array variables on a on html any help or pointing in the right direction will be gladly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:04:48+00:00Added an answer on May 26, 2026 at 11:04 am

    why use array when u can easily echo a HTML code in php..

    echo "<ul>";
    while($row = mysql_fetch_assoc($result)){
       echo "<li>{$row}</li>";
    }
    echo "</ul>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

CFMX 8 Enterprise I have turned on the Use J2EE session variables setting under
I commonly see people setting $_SESSION variables as $_SESSION['example']=$_REQUEST['something']; $example=$_SESSION['example']; is this redundant? I
I need to tweak some variables (only in a development setting) without having to
I am setting up a external tool but when I use the argument variables
How can I have a dynamic variable setting the amount of rows to return
I've got a choose statement that should be setting my variable but for some
I am working in flex and I am just setting a variable to false.
I must be overlooking something simple. I'm setting a variable from a query result
I am copying a file to a directory, and then setting an environment variable
Simply setting the SVN_EDITOR variable to mate does not get the job done. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.