₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,119 members, 8,420,466 topics. Date: Thursday, 04 June 2026 at 08:32 PM

Toggle theme

Simple Array Problem In Php - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingSimple Array Problem In Php (1578 Views)

1 Reply (Go Down)

Simple Array Problem In Php by leastpay(op): 9:47am On Dec 05, 2012
i want to count the number of order a customer has made by using an array which i know is d method. List of items are display in a checkboxes. After a customer have selected an items , he click the "add to cart " to display number of items and goods selected. I tried to use count() but it display all element in d array. Thanks for your help.
Re: Simple Array Problem In Php by bakenda(m): 10:44pm On Dec 05, 2012
How did you use count(),
let's see some of your code.
Re: Simple Array Problem In Php by albertjr:
PHP is server side scripting language. It is use for designing web page. PHP may be deployed on most internet servers and additionally as a standalone shell on nearly each operating system.
importance of education in islam
the importance of education in islam
muslim education
Re: Simple Array Problem In Php by cmespeak: 3:46pm On Dec 06, 2012
albertjr :
PHP is server side scripting language. It is use for designing web page. PHP may be deployed on most internet servers and additionally as a standalone shell on nearly each operating system.
bros y d lecture,pls solve the guys problem.
Re: Simple Array Problem In Php by Bossman(m): 4:55pm On Dec 06, 2012
I do not know PHP, but what you are trying to do applies regardless of language. Can't you just declare a count variable, and add to it (whatever is entered as the number of items) when ever the user ads an item to the cart, and deduct from it when an item is removed. If you want the number of items for each item type, then you can use a map (or something similar in php). because you will need to store the count for each item type. OTOH, you can use 2 arrays - one will store the item type and the other will store the count associated with that item. Then just use the position within the array to identify an item and its associated count.
Re: Simple Array Problem In Php by leastpay(op): 8:10am On Dec 07, 2012
please download and check out the php script i wrote n make necessary correction 4 me thnks
Re: Simple Array Problem In Php by Nobody: 9:02am On Dec 07, 2012
leastpay: please download and check out the php script i wrote n make necessary correction 4 me thnks
array.doc
copy and paste it here. moreover, who codes in microsoft word anyway?
Re: Simple Array Problem In Php by leastpay(op): 11:06am On Dec 07, 2012
i'm using a phone to browse, meaning i can't paste the code here.so download if u are browsing from a pc.thnks
Re: Simple Array Problem In Php by AZeD1(m): 5:12pm On Dec 07, 2012
Declare a variable v and initialize it to zero the loop through the array and add 1 to v.
Re: Simple Array Problem In Php by Vijon(m): 9:30pm On Dec 07, 2012
hi @all,plz who can help me wit php ebook or video tutorial.email is vijononline@gmail .com.tanks
1 Reply

Please Help With An Array ProblemPhp Array Problem [SOLVED]Converting Picture To Byte Array(blob) And Back To Picture234

Is There A Market For A Nigerian Social Media App ??How Do I Create Responsive Slider With JavascriptRemote Desktop Connection