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 6992789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:40:49+00:00 2026-05-27T19:40:49+00:00

I have this source code at the moment, but the issue I am having

  • 0

I have this source code at the moment, but the issue I am having is that the site will not display code. It appears in the database correctly, but when being pulled from the database to the display page there seems to be an issue.

<?php 
while($row = mysql_fetch_array($snippetinfo))
  {
  $dSnippetID = $row['snippetID'];
  $dSnippetDate = $row['dateAdded'];
  $dSnippetText = $row['snippetContents'];
  }
?>

<div class="container">
<div class="content">
  <div class="page-header">
    <h1><?php echo $dSnippetID; ?> <small><?php echo $dSnippetDate; ?></small> </h1>
  </div>
  <div class="row">
    <div class="span10">
     <pre class="prettyprint">

      <?php echo $dSnippetText; ?>

    </pre>
    </div>
  • 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-27T19:40:49+00:00Added an answer on May 27, 2026 at 7:40 pm

    do you get only one result, but not all? if so change too [ ]

    while($row = mysql_fetch_array($snippetinfo))
      {
      $dSnippetID[] = $row['snippetID'];
      $dSnippetDate[] = $row['dateAdded'];
      $dSnippetText[] = $row['snippetContents'];
      }
    
    
    <?php echo $dSnippetID[0]; ?> <small><?php echo $dSnippetDate[0]; ?>
    

    if you want get all results you maybe need a foreach loop

    foreach($dSnippetID as $id){
    echo $id;
    }
    

    if you dont get any rows; maybe var_dump($row);

    and also post more informations 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i will post my source code i have at the moment and explain my
I have this simple code for keydown. At the moment is fading in div1.
I'm training code problems, and on this one I am having problems to solve
I have a script that parses IIS logs and at the moment it fetches
I was looking over the Ninject MVC source code, and the method that generates
Hello I've been trying to resolve the issue that I've been having with the
I have my own RTSP Source Filter solution which is still under development but
I have a piece of data. At the moment, it's an XML file, but
I am trying to figure out a git workflow. At the moment we have
I set up a new project on Google Code and have set Mercurial as

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.