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

Shuffle Array
Hi,

I am writing a script for a game that needs players to randomly be assigned a target (ano

word wrap in emails help needed
Hello, I understand how wordwrap works in php and have used it well before. However when I used wor

Image loading
Hi Developers,

I'm trying to display an image from images/image.gif getting the url from mysq

get multiple rows
Hi I want to get multiple rows from a db

I am using this for the db query
Code: public

Sales orders ans reservations not taken into account on MPS / MRP
Hello,

I am implementing the MPS / MRP and I have the following problem:

I ha

PHP referral database. I would like this form to email the referrer.
Okay, Hello I've been trolling for years. This the first time I've ever asked for php help. Normally

Customizing message/behavior
Hi,I'm using the ASP.NET membership/authorization controls in my application. Some parts of my appli

I would like "for" to wait 5 sec
I would like my 'for' loop to wait 5 sec before second iteration.


for ($i=0; $i<10

RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged verticall

How to validate from 2 possible answers
Hi

I hope somebody can help me with what will probably be really simple, I'm pulling my hair

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