Jump to content

Search the Community

Showing results for tags 'manipulating arrays'.

  • 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 2 results

  1. I have an existing PHP array ($products) with various fields in it.... id / title / description / link / image link etc. etc. as per requirements for a Google Products feed (https://support.google.com/merchants/answer/7052112). My issue is that, for clothing, Google want a separate record for each size available. My array includes the "size" field as a comma separated list e.g. 6,8,10,12,14 or XS,S,M,L,XL etc. etc. So before creating the feed (a text file, which is currently outputting fine except for the size field issue) I need to duplicate each id where there's more than 1 size in that field, for each size, and then manipulate the fields a little so that (ignoring all the duplicated fields that would remain unchanged) instead of the single record : - id size item group id 52 6,8,10,12,14,16,18,20,22,24,26 I'd have 11 records, item group id would be what the id is, the size appended to the id, and the size field only one (in sequence of those from the original), so: - id size item group id 52-6 6 52 52-8 8 52 . .. ... 52-24 24 52 52-26 26 52 That's just one product....there are quite a lot, each with multiple sizes, but all in the same format within the $products array. As always, any help / pointers / solutions much appreciated!
  2. This is the project I need to finish. I am fairly new to php and this project has got me confused. Any help would be greatly appreciated I am trying to do a Web form that is taking an online order form! This is What I have so far: This is the input page or html page: <form method="POST" action="OnlineOrders.php"> <table border=0> <tr> <td width=260>NameE<br /></td> <td width=295>Descripation<br /></td> <td width=45>Price<br /></td> <td width=35>Quanity<br /></td> </tr> <tr> <td>Shirts</td> <td>Red</td> <td align="right">$11.50</td> <td align="center"><input type="text" name="shirt" size="3" maxlength="3" /></td> </tr> <tr> <td>Pants</td> <td>blue</td> <td align="right">$23.99</td> <td align="center"><input type="text" name="pants" size="3" maxlength="3" /></td> </tr> <tr> <td>Shoes</td> <td>Tennis Show</td> <td align="right">$35.25</td> <td align="center"><input type="text" name="shoes" size="3" maxlength="3" /></td> </tr> <tr> <tr> <td>Coat</td> <td>Winter coat</td> <td align="right">$47.50</td> <td align="center"><input type="text" name="coat" size="3" maxlength="3" /></td> </tr> <tr> <td>Socks</td> <td>Yellow</td> <td align="right">$4.99</td> <td align="center"><input type="text" name="socks" size="3" maxlength="3" /></td> </tr> <tr> <td>Hats</td> <td>Baseball Cap</td> <td align="right">$8.99</td> <td align="center"><input type="text" name="hats" size="3" maxlength="3" /></td> </tr> </tr> </table> </form> <br /> <input name="submit" type="submit" value="Submit Order" /> <input type="reset" name="reset" value="Recalculate Order" /> <hr /> <p> <a href="OrderBoard.php">View Order</a> </p> </body> </html> ******************** The problem is I don't know what to do with the processing page for me to do the rest: I am taking about OnlineOrders.php that i have at the beginning of the program: <form method="POST" action="OnlineOrders.php"> How do i start the Processing page of the program! Can Someone show me how do I start and I could do the rest! Thank You!
×
×
  • 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.