Jump to content

inspireddesign

Members
  • Posts

    114
  • Joined

  • Last visited

    Never

Everything posted by inspireddesign

  1. I guess I don't need a foreach loop here ... this is what I've done to extract the data. echo $custInfoArry['ListID']
  2. Thanks for the help so far everyone. Here's what I have right now as my output. This is NOT protected by any class. How would I extract this information using a foreach loop? This is what I'm doing now and I'm only getting the first character in the loop. Moreover, It's looping though the entire array printing everything and not what I've indicated in the loop. Not sure why? Thanks for any help on this! $custInfo = $API->getCustomerByName('Keith Palmer (1417262473)'); $custInfoArry = $custInfo->asList(QUICKBOOKS_ADD_CUSTOMER); foreach ( $custInfoArry as $Customer ) { echo 'ListID: ' . $Customer['ListID'] . '<br />'; }
  3. I tried both approaches and neither worked guys ;( I know I can get a this data LOL! Thanks!
  4. The array from print_r($Customer); QuickBooks_Object_Customer Object ( [_object:protected] => Array ( [ListID] => 284 [TimeCreated] => 2010-11-23T13:09:22 [TimeModified] => 2010-11-26T10:07:47 [EditSequence] => 2 [Name] => Keith Palmer (1417262473) [FullName] => Keith Palmer (1417262473) [sublevel] => 0 [CompanyName] => New Company Name [FirstName] => Damian [LastName] => Clem [shipAddress Addr1] => 134 Stonemill Road [shipAddress City] => Storrs [shipAddress State] => CT [shipAddress PostalCode] => 06268 [PrintAs] => Keith Palmer (1417262473) [balance] => 0.00 [TotalBalance] => 0.00 [isStatementWithParent] => false [DeliveryMethod] => Print ) ) Here is what I have so far but there's no output. Doesn't throw any errors. Thanks for any help you can provide me. $Customer = $API->getCustomerByName('Keith Palmer (1417262473)'); // Generates the Array I want to loop through. foreach ( $Customer as $cust => $value ) { echo $cust['ListID'][$value]; }
  5. Hello All!! I have the following array: How would I extract the values in the this array using a foreach loop? Thanks!!
  6. Both solutions worked great! Thanks guys.
  7. Yeah, the output is only showing the first character of the array and it's not looping correctly: Here's the output: FYI: I only have two rows of data. So the output below in incorrect. There should only be two rows not four. Name: D Address: D Name: T Address: T Name: 4 Address: 4 Name: 3 Address: 3 Also, I've moved the $rowOutput var in the first loop which did only give me two rows but the output was also not correct. Here's that output: Name: T DOB: T Name: 3 DOB: 3 Damian
  8. Hello all, I think I have a simple question. I have several arrays that I need the output from but I need the output from each array to be together. I know WHAT?! I'll try to explain: I have a dynamic jQuery form that fills in a table with data. Each "field" or <td> has separate information in each. The way I output the data is in an input box so that I can capture the value of each. The name attribute is the array for each input. So for example the output for each would look like this: <tr> <td> <input type="text" name="fullName[]" value="input_from_user"/> </td> <td> <input type="text" name="Address[]" value="input_from_user"/> </td> </tr> If you can visualizes this we could have several rows of data from each array (fullName[] and Address[]). How would I extract the data in such a way that I can clump them into their appropriate rows? I know how to extract them one by one using foreach loop on each array but that won't do what I want. I would like the output to be like this: John Doe - 22 S Main Street Jim Smith - 111 N Main Street and so on... This is what I have so far but I'm sure this isn't how to accomplish what I'm after. $name = $_POST['fullName']; $address = $_POST['Address']; $outputArry = array( "FullName" => $name, "Address" => $address ); foreach ( $outputArry as $output ) { foreach ( $output as $row ) { $rowFullName = $row['FullName']; $rowAddress = $row['Address']; $rowOutput .= 'Name: ' . $rowFullName . ' Address: ' . $rowAddress . '<br />'; } } echo $rowOutput; Thanks for any help on this issue. Damian
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.