Jump to content

carugala

Members
  • Posts

    20
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

carugala's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. aye, aye, aye... just foreach the titles, and then use the index for your value array. You are going thru each title, and then each value. you want the vals for the title. foreach titles as id foreach value[id] as newid wait, you need this.... the key foreach (array_expression as $key => $value), so foreach (titles as $key => $title_value) nest foreach (values[$key]=> $val_value) name your variables better. shorter, and don't use ambiguous names, like value, or each, or if, or not, or continue, or break..... Try: $prod_name $prod_desc
  2. well, maybe I don't, but I believe I understand null quite well. In 1988, before null really existed, what did programmers use then? if not set in memory, how can test? nevermind, early php, only had concept of null to address DB access, and using php to retrieve said values, and now php is all nullified! now me pissing and lol. $var; actually declaring a var is not necessary in loosely typed php, initializing is good enuff. A php trait. regardless of PHP implementation, comparing nulls should be an exception(doh!), not common coding practice. what exactly is the binary code for null, if not stored in memory? This is an olde argument, but a good one....
  3. null is unknown. an empty, oops, placeholder. ok, I'll know it when I see it! using null as a comparison, is pretty stoopid. 1 null has no relation to any other null. null was created from relational dbs, to cover when no data exists, outside join like. SELECT * FROM user, type, WHERE user.id=type.id. What if you want all users, regardless of type?
  4. nice way to ignore NULL! iffin NULL doesn't exist? why use?
  5. this may be harsh, wtf is the subject of the post? ""? is the concept of discussing OOP, too far and high? The best oop example is: drumroll please: minesweeper 0.29$ on iOS, with zune 68BBE coupon code.
  6. guess this is hard. as this is php forum, the environment is well defined. basically browser and php. Is poker a good OOP example? from all the replies, not a 1? but again, what is a good example? pfft, I'll take my deck and play elsewhere. hal, 'open the pod bay doors'
  7. That's what google is for. This forum is for you doing the work and telling us where you're stuck. If you ask a verbose enough question in a half-decent manner, I'm sure the community will come through for you. Really! google is a search engine, an interweb search engine. I'll take that answer as you don't know. Did you google "poker as an OOP example"? hakimserwa, I learned OOP before the interwebs even existed, thus even before PHP existed! youse touse seem more stuck than I am....
  8. $users_sql = "SELECT * FROM users" ORDER BY name... SQL Use the DB to manipulate the data, not the code. Very useful.
  9. Hokay, this shouldn't be that hard? right? pre: (what we need) rules o poker(.... deck o cards place to play way to manage the poker anyone help with some requirements gathering, and maybe some simple documentation? nfs, thanks
  10. WHOA!!!!!! pissing contest? personally, I would only say something like that, if I could PROVE: if unreadable, well, nothing else you post is relevant. how is it incorrect, if no read? illogically st... ok, spock, define structure(d). we can go from there. deprecated? nobody who knows that word would use it as you have. plus, even if deprecated, still works.
  11. some simple stuff. rollDice() is rolling a die, or rolling more than one? looks like rollDice originally was a random number from how many sides the dice(die) had. semantically this is moot(singular vs. multi), logically, it's not. The number of dice, and their potential values are the important things. So make a truly, useful, generic rollDice fn: public function rollDice(xvars){...}; xvar = the parameters we pass, and they can of type... This has been done before, google 'PHP dice'.... anyway: public function rollDice($value, $inc, $exc, $off){}; $value replaces $sides, coz, it is an array that holds the sides value?? array size is num sides. As you have boolean for do not reroll, then reroll is possible, and the above function can recurse, for when that happens. we need to know what the expected value of the fn is, even before the params, but, we'll assume
  12. methinks you have to do something to the html form element(select/cb...), like name=name[]
  13. keep posting, want to see how far you get... to answer your subject: You need a DB. Which leads me to a ? Once you load all this data into a BFA(big friggin array), how do you make changes to that data? Like when one levels up? What if you need to add a new amulet, or fist 'of goodness'?
  14. actually it is. define "refresh". This is totally client browser issue. or is it? can the server 'refresh' my client browser? typing 'what'? in what 'form'? login yahoo mail, look at no one sends me email. When I click client browser 'refresh' button, what happens? Wait, what if I open multi tabs/winders on yahoo mail... any tab/winder, When I click client browser 'refresh' button, what happens? Wait, login compuserve, login AOL, open a safari winder?
×
×
  • 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.