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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T08:29:39+00:00 2026-05-28T08:29:39+00:00

i am facing this problem here. i want to show item’s name by getting

  • 0

i am facing this problem here. i want to show item’s name by getting its item id from another table. following is the code
i am having problem when i try to show name using “.$obj[0]->name.” in the first line of the for loop.

$objClass = array(); 
$objClass1 = array();
$obj= array(); 
$object = new product();
$objLogic = new customerLogic();
$objLogic1 = new customerLogic(); 
$objL= new productLogic();
$objClass[0]= new stdClass;
$objClass1[0]= new stdClass;
$obj[0]= new stdClass;
$objClass[0]->custId = $_GET['id'];
$objClass1[0]->custId = $_GET['id'];

$objClass = $objLogic->getSaleRecord_customer($objClass[0]);
$objClass1 = $objLogic1->getName_customer($objClass1[0]);
$object->itemId = $objClass[0]->itemId;
$obj =$objL->getName_product($object->itemId); 
// echo $objClass1[0]->firstName;
$i=1;
foreach($objClass as $customer ) {
    echo "<tr><td class=\"inner_text\">$customer->reciept</td><td align=\"center\">".$obj[0]->name."</td>";
    echo "<td align=\"center\">".$objClass1[0]->firstName."&nbsp;".$objClass1[0]->lastName."</td><td align=\"center\">";
    echo "$customer->weight</td>
    <td align=\"center\">$customer->costPerKg</td>
    <td align=\"center\">$customer->cost</td>
    <td align=\"center\">$customer->payed</td>
    <td align=\"center\">$customer->remaining</td></tr>";
    $i++;
}
?>
</table>
  • 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-28T08:29:39+00:00Added an answer on May 28, 2026 at 8:29 am

    Are you completely sure that $objL->getName_product($object->itemId); yields an object?

    Could you verify that?

    I think the return value of $objL->getName_product($object->itemId); is not what you think it is.

    You can check it by print_r($objL->getName_product($object->itemId)); which will give you a printout of the contents of that functions output.

    Or maybe you are unintentionally overriding the contents of $obj?

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

Sidebar

Related Questions

I'm facing a problem with IE6. I took the toggle function from this website
Here I am facing a problem that I want to pass a dataset to
I want to rotate the image around its center point.The problem i am facing
Facing problem with every fetch i want to make using EF Query model.Place here
I'm facing this problem again and again, but can't find any solution (except mine,
I was facing this unique problem of generating a bit-mask based on the input
I am facing a problem while creating a static cursor in DB2. This is
I have created a static library following this link . But I am facing
I'm facing a problem determining whether the checkboxes are checked. This is because they
I'm facing a huge problem here which is driving me crazy, I've made an

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.