OOP help


Posted on 16th Feb 2014 07:03 pm by admin

okay so i have a class im making it has everything setup i just need to randomize the 2 variables and return which variable that was randomized and output it.


Code: <?php
class hit_chance {
protected $character_miss,$character_attack;


public function __construct($icharacter_miss,$icharacter_attack){
$this->character_miss =$icharacter_miss;
$this->character_attack =$icharacter_attack;

//randomize and output below
}
}?>

No comments posted yet

Your Answer:

Login to answer
294 Like 25 Dislike
Previous forums Next forums
Other forums

Sessions Value Not Saved
Hi,

Im making a login form and im using this code:
Code: if($login=="true"){

Referential Integrity problem when inserting into 2 tables at same time
Hello Everyone,

Im relativity new to PHP and MySQL and i have come up against a problem. i h

fwrite error
Hi All,
Does anyone know what is causing the error in this code?

Code: <?
$error

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

Keep newlines from textarea?..
I'm creating a simple encoding program, and what I want it to do is retain the newlines, as echoing

php mailer
How can i send a mail to large no, say 50,000 reciepients using [color=#0000FF]php mailer[/color]

Is there a more efficient way to code this than what I have?
I have three associative arrays.

$combinedSettings
$userSettings
$defaultSettings

Passing PHP variables from one page to another
Hello-

I'm having trouble figuring out how to transport a variable from one php file to anoth

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

php forms and database navigatio
Hello,
I'm new to php and i'd like to post the following.
I have written code to get records f

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash