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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:13:49+00:00 2026-05-24T02:13:49+00:00

for ($x = 1; $x <= $num; $x++) { $userArray[] = $this->input->post(select . $x

  • 0
 for ($x = 1; $x <= $num; $x++) {
 $userArray[] = $this->input->post("select" . $x . "");
 }
    $userArray = split(',', $userArray);
$productName = $userArray[0];
$barcode = $userArray[1];
$quantity = $userArray[2];
    $flag = $this->cartmodel->productCategory($category);
 }

The main problem in the code is that it is not able to come to $userArray … it takes it as array….

got a doubt…. m fetching the quantity through text box.. but its not able to get in the array….

   <input type="text" name ="Quantity<?=$i;?>" id = "Quantity<?=$i;?>" value=""/></td> 
  <select name="select<?=$i;?>"><option value="">NO</option><option value="<?=$row ->product_name;?>,<?=$row->barcode?>,<?=$i;?>">YES</option>
  • 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-24T02:13:51+00:00Added an answer on May 24, 2026 at 2:13 am

    http://php.net/manual/en/function.split.php – split takes a string as an argument, not an array.

    for ($x = 1; $x <= $num; $x++)
    {
      $input = $this->input->post("select" . $x . "");
      $row = split(',', $input);
      $productName = (isset($row[0]) ?  $row[0] : '');
      $barcode = (isset($row[1]) ?  $row[1] : '');
      $quantity = $this->input->post("quantity" . $x . "");
      $flag = $this->cartmodel->productCategory($category);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$('input[name=id_num]').blur(function(){ $.ajax({ type: POST, url: data_fetcher.php, data: idnum= ' + this.val + ', success:
Given a list like this: num = [1, 2, 3, 4, 5] There are
The type of this function is function :: Num a => ([Char],a) -> ([Char],a)
I have the following Javascript code add_num = { f: function(html, num) { alert(this.page);
If I run a query such as: SELECT COUNT(*) as num FROM table WHERE
i am doing this: CREATE TABLE person ( num INT NOT NULL , firstname
Consider this example: struct { int num; } s, *ps; s.num = 0; ps
I have this code: NSNumber *num; NSAutoreleasePool *apool = [[NSAutoreleasePool alloc] init]; for (int
run([H|T]) --> num(H),run(T). run([T]) --> num(T). num(increase) --> [increase],{write(1),nl}. num(decrease) --> [decrease],{write(0),nl}. In this
Suppose I have this code: class Num: def __init__(self,num): self.n = num def getn(self):

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.