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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:16:27+00:00 2026-06-14T21:16:27+00:00

This has me completely baffled, I’m doing the following: if($tasks = someFunction(1)) { }

  • 0

This has me completely baffled, I’m doing the following:

if($tasks = someFunction(1))
{


}

someFunction() returns an array of records from a database. For some reason, assigning this array to $tasks causes a number to be printed out to the screen. The number it prints is the number of records that it has returned, but at no point do I ever echo this variable.

To confirm, I added the following code:

$tasks = someFunction(1);
$tasks = someFunction(1);
$tasks = someFunction(1);

Above the if statement, and sure enough I was greeted by “4444” on my screen (It was returning 4 records). I’ve implemented code that’s basically identical elsewhere in my code and have never run into this, I’m confused as to how a variable assignment can cause a value to display on the screen.

  • 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-06-14T21:16:28+00:00Added an answer on June 14, 2026 at 9:16 pm

    You are most likely outputting a number from inside the someFunction() method.

    Try doing a ctrl+F (Windows) or command+F (Mac) to find text and search for echo or print to find the occurence.

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

Sidebar

Related Questions

For some reason, the retain/release behavior in the following code has me completely baffled.
Studying some code from a codeigniter tut, the following preg_match pattern has me baffled:
Ok, this one has me baffled, and I'm hoping some fresh perspective can lead
This has got me completely stumped: print_r($json); echo json_encode($json); output: Array ( [query] =>
this has baffled me for a couple of hours now. Why do i get
This has gotten me completely frustrated I have a few webcombo boxes that are
My logcat output has completely disappeared from both eclipse and adm logcat. In both
I am definitely not new to NSDateFormatter or NSDate but this has completely stumped
Apologies if this has been asked...but I can't find (or I am using completely
Ok, so this has me completely stumped just like the guy here with the

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.