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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T12:38:16+00:00 2026-06-12T12:38:16+00:00

I have an array that I created by this query: $run=0; $result = $conn->query(SELECT

  • 0

I have an array that I created by this query:

$run=0;
$result = $conn->query("SELECT distinct isbn13 from inventory 
                        WHERE quantity>0 and isbn13 like '978%' limit $run, 20");

while($image = $result->fetch_assoc())
{
    $isbn[$x] = $image['isbn13'];  
    $x++;
} //end while

and I need to pass it into this function:

$parsed_xml = ProductId_xml($isbn);

I know there is information in the $isbn because I used print_r($isbn); and saw the array. However, when I do the same in the function (var_dump($searchterm); die;), I get NULL.
Here is part of the function:

count=0;

function ProductId_xml($searchTerm) {
    var_dump($searchTerm); die;

    $params = array(
        'AWSAccessKeyId' => AWS_ACCESS_KEY_ID,
        'Action' => "GetMatchingProductForId",
        'SellerId' => MERCHANT_ID,
        'SignatureMethod' => "HmacSHA256",
        'SignatureVersion' => "2",
        'Timestamp'=> gmdate("Y-m-d\TH:i:s.\\0\\0\\0\\Z", time()),
        'Version'=> "2011-10-01",
        'MarketplaceId' => MARKETPLACE_ID,
        'IdType' => "ISBN",
    );

    $id=array(explode(',',$searchTerm));

    foreach ($id as $newId)
    {
        $count .= $count +1;    
        $params += array('IdList.Id.'.$count => $newId);
    } //end of foreach  

How do I get the information into my function?

  • 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-12T12:38:17+00:00Added an answer on June 12, 2026 at 12:38 pm

    The incoming variable $searchTerm should be an associative array. You don’t need to explode it. You should just be able to access the information by saying $searchTerm['key'] or by using a foreach loop.

    foreach ($searchTerm as $key=>$val) { 
        $params['IdList.Id.'.$key] = $val;
    } //end of foreach  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created an array in php that prints this Array ( [mark] =>
I have a query with a self join that looks like this, select t1.
I have this query which when run in mysql cli gives the proper result
Explanation I have a multidimensional array that is iterated over to created a categorized
I am currently trying to pass an array that I have created in Javascript
I have a query, which when run from within phpMyAdmin, it works, however when
I have two arrays that I create like this: public int GameBoard[][] = new
I have a snippet of code that creates an array clusterUniqueMarkers that stores all
I have a 3x3 array that I'm trying to create a pointer to and
I have a page that creates an associative array, then passes it as a

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.