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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:28:57+00:00 2026-05-22T14:28:57+00:00

I was wondering if someone could help me with this problem. I want to

  • 0

I was wondering if someone could help me with this problem.
I want to print/echo the solution of the function multiple times on the same page. Is that possible?

Here’s my function:

public function getFeedback($p_iUserid) {

    include("Connection.php"); //open db

    try
    {
        $sql = "select DiaryOpmerkingen, DiaryDoctorcomment from tblDiary 
                WHERE fk_UserId = ".$p_iUserid."
                AND DiaryDay = '".$this->Day."';";
        $rResult = mysqli_query($link, $sql);
        return $rResult;
    }
    catch(Exception $e)
    {
        // no connection database
        $feedback = $e->getMessage();
    }
    mysqli_close($link);
}

And this is how I manage to call on the function by now. But it only works once:

if(mysqli_num_rows($feedbackPatient) > 0)
                    {
                        while($oUser = mysqli_fetch_assoc($allUsers))
                        {
                            echo $oUser['DiaryOpmerkingen'];
                        }
                    }

I hope someone can help!
Thanks anyway.

  • 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-22T14:28:57+00:00Added an answer on May 22, 2026 at 2:28 pm

    Create a function for your printing task, then call it as many times as you want:

    function print_the_stuff($feedbackPatient){
    
    if(mysqli_num_rows($feedbackPatient) > 0)
                        {
                            while($oUser = mysqli_fetch_assoc($allUsers))
                            {
                                echo $oUser['DiaryOpmerkingen'];
                            }
                        }
    }
    

    Then, wherever you need to print:

    print_the_stuff($feedbackPatient);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was wondering if someone could help me understand this problem. I prepared a
I was wondering if someone could help me get pointers to solve this problem.
I'm wondering if someone could help guide the approach to this fairly common problem:
I was wondering if someone could help me with this. I have defined my
was wondering if someone could help with this one. This is the first time
I was wondering if someone could help with this: I have a series of
wondering if someone could help me, but at the same time hopefully I can
I have reached a problem and was wondering if someone could help me please.
I was wondering if someone could help me out with an xml problem I'm
I have an SQL problem i was wondering if someone could help me out.

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.