Jump to content

Search the Community

Showing results for tags 'php array mysql'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, I make some code and almost finish my shopping cart on website. Just need finally touch . Ok, I have problem on last page, problem is like this. When someone click to order what he putted in shopping cart, on one page I wanna list everything what he ordered an send on e-mail. Trick is I don't have only id in array, I have almost quantity. For example, if someone order article with id=1 and quantity 3, and article with id=2 and quantity 4, and article with id=3 and quantity 2. On my page I get all that in array like this: $array=$_POST['id']; When I print that I get this: 1-3,2-4,3-2 How to I get from my table "description", list of every article in this example and immediately multiply them price with quantity? I try something with: $id_quantity_pair = explode("-", $array); // Uses Hyphen(-) as delimiter to separate product ID from its quantity $product_id = $id_quantity_pair[0]; // Get the product ID $product_quantity = $id_quantity_pair[1]; But I dont know how to put that in list, I know only to working with array with one value. Anyone to help me?
×
×
  • 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.