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

urldecode question
How would I format this line of code properly?

<?php echo urldecode($_GET['Title']); ?

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

Hashing?
Hi, I was hoping to take a string value then convert it - consistently - across each of our pages in

problem with refreshing
in my site, i have an index page, it has a main div. this main div's content is changing according t

script is pulling more then they have....
I have this script for my game where they can change there race. This will cost them 2,500 points. H

natcasesort works on one server but not on another
Hi

I have a problem that I was hoping that someone can help me with.

I'm trying to use

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

Problem with DB connection
Hello there! I'm new to this forum and I'm new to PHP coding also. I wrote something that doesn't ma

Why Are These Functions Causing MASSIVE Memory Problems? Please Help!
Hi,

I have a script with some options.

I use regex to replace patterns in strings, but

How to use Substr
I want to check for the word CATEGORY: inside a string which can be CATEGORY: ITEM
and remove the

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