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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T21:38:25+00:00 2026-05-31T21:38:25+00:00

I have never used array_combine before and I am getting a Boolean instead of

  • 0

I have never used array_combine before and I am getting a “Boolean instead of resource” error in the query. If I change the query to read … WHERE cal_id = ” . $quidx . “; the Boolean error goes away but I get unexpected T_STRING errors later in the script for reasons I can’t figure, and the outcome of the query is nothing.

Main question: Is this the proper usage for array_combine? If so, what am I missing in the rest of this script that causes no information after the query? $quid1 is an array of id numbers and $tm is an array of Unix timestamps. Both arrays check out to have the same number of rows consistently. After array_combine, $cls1 returns a valid array of both previous arrays but they don’t seem to work in the query.

Thanks for helping. I’m still learning.

I have edited the script to include the new query statement. Problems now are with the foreach statements where the error reads invalid argument.

$cls1 = array_combine($quid1, $tm);
      $quidx = array_values($quid1);
      $quclx = array_values($tm);
//// note to self.. start final query for email write with new id data, likely redundant.
$qumail = "SELECT cal_id, cal_name, cal_time, cal_description FROM webcal_entry WHERE cal_id in (" . implode (',' , $quidx) . ")";
$wemail = mysql_query($qumail);
while ($row = mysql_fetch_array($wemail, MYSQL_NUM)) {
    $quname2 = $row[1];
    $qtime = $row[2]
    $qudesc2 = $row[3];

Here’s the complete script section where this is applicable. I’m still pecking through it so it’s not all fixed yet:

$cls1 = array_combine($quid1, $tm);
      $quidx = array_values($quid1);
      $quclx = array_values($tm);
//// note to self.. start final query for email write with new id data, likely redundant.
$qumail = "SELECT cal_id, cal_name, cal_time, cal_description FROM webcal_entry WHERE cal_id in (" . implode (',' , $quidx) . ")";
$wemail = mysql_query($qumail);
while ($row = mysql_fetch_array($wemail, MYSQL_NUM)) {
    $quname2 = $row[1];
    $qtime = $row[2]
    $qudesc2 = $row[3];
}
    foreach ($qtime as $key=>$btUx) {
        if (strlen($btUx) < 6){
        $btUx = '0' . $btUx;
        date_default_timezone_set('UTC');
        $unixEpoch = strtotime($btUx);
        date_default_timezone_set('America/Denver');
        $formtime = date("H:i", $unixEpoch);
      }
    }
    foreach ($tm as $key=>$tf) {
        $idnotime = 0;
        $idnow = (strlen($tf) > 2);

    switch($tf) {
      case $idnow:
        $repmlnow = sprintf("Event: %s \nTime: %s \nDesc: %s \n\n", $row[1], $formtime, $row[3]);
        break;
      case $idnotime:
        $repmlnotm = sprintf("Event: %s \nDesc: %s \n\n", $row[1], $row[3]);
        break;
   }
}   
/////===================== send mail... 

This is my last edit unless there are other comments. I have changed the original script to the following and everything seems to work properly in this case thanks to the contributor below…

$cls1 = array_combine($quid1, $tm);
      $quidx = array_values($quid1);
      $quclx = array_values($tm);
$qumail = "SELECT cal_id, cal_name, cal_time, cal_description FROM webcal_entry WHERE cal_id in (" . implode (',' , $quidx) . ")";
$wemail = mysql_query($qumail);
while ($row = mysql_fetch_array($wemail, MYSQL_NUM)) {
    $quname2 = $row[1];
    $qtime = $row[2];
    $qudesc2 = $row[3];
}
if(strlen($qtime) < 6){
    $btUx = '0' . $qtime;
    date_default_timezone_set('UTC');
    $unixEpoch = strtotime($btUx);
    date_default_timezone_set('America/Denver');
    $formtime = date("H:i", $unixEpoch);
}elseif(strlen($qtime) > 5){
    date_default_timezone_set('UTC');
    $unixEpoch = strtotime($value);
    date_default_timezone_set('America/Denver');
    $formtime = date("H:i", $unixEpoch);
}
foreach ($quclx as $key=>$tf) {
    $idnotime = 0;
    $idnow = (strlen($tf) > 2);

    switch($tf) {
      case $idnow:
        $repmlnow = sprintf("Event: %s \nTime: %s \nDesc: %s \n\n", $quname2, $formtime, $qudesc2);
        break;
      case $idnotime:
        $repmlnotm = sprintf("Event: %s \nDesc: %s \n\n", $quname2, $qudesc2);
        break;
  }
}   
/////===================== send mail...  
  • 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-31T21:38:26+00:00Added an answer on May 31, 2026 at 9:38 pm

    $quidx is an array with numerical index as key and $quid1 array values as it value. try change query become:

    $qumail = "SELECT cal_id, cal_name, cal_time, cal_description FROM webcal_entry WHERE cal_id in (" . implode (',' , $quidx) . ")";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have never used LINQ before, and I am getting an error in an
I've never seen this error before, I have also never used arrayList before, I
Just trying to understand that - I have never used it before. How is
I have never used generics before and was wondering how to constrain the Type
I have never used NSPredicate before so please bear with me. I have an
I have never really used XSLT before and am looking for some advice. I
I've never used ASIHTTPRequest before, nor have I dealt with posting anything from an
I have never used octal numbers in my code nor come across any code
i have never used LINQ in any of my projects , i have always
I have never used virtualization, and am trying to get up to speed. My

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.