Jump to content


Popular Content

Showing content with the highest reputation on 07/28/2021 in Posts

  1. less... $matched = array_intersect_key($all, array_flip($referred_by_Affiliate));
    2 points
  2. It's been at least a decade since I played around with the getid3 library. I'll be honest, I have no idea what ETCO tag data is. But, I have a possible solution. Do you have a file with existing ETCO tags or is there a tag editing application that you can use to set such tags? If you have a file with example tag data that you know what it represents, then instead of using getid3 to set the data, use it to get the data. You can then see what the format of the data is that it expects. I remember doing something similar for some other tag information at the time.
    1 point
  3. After you json_decode without the true do the following: echo "<pre>"; print_r($result); echo "</pre>"; That will show you the resulting associative array so you can see how to reference the elements by key.
    1 point
  4. Here's a shortened version. It also uses json_decode without the "true" to give an object (containing objects) $all = json_decode($all_items_sold); $placeholders = $values = []; foreach ($all as $pid => $prod){ if (in_array($pid, $referred_by_Affiliate)) { $placeholders[] = "(?,?,?)"; array_push($values, $pid, $prod->item, $prod->price); } } $stmt = $db->prepare("INSERT INTO mytable (prod_id, item, price) VALUES " . join(',', $placeholders)); $stmt->execute($values); A PHP join has nothing to do with MySQL joins.
    1 point
This leaderboard is set to New York/GMT-04:00
  • 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.