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

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

Adding to the next element in a multidimensional array
Hi, I'm trying to add a value to $node->field_spaces['nid'] where x is the next available spo

Remore client postprocessing phase getting dump SAPSQL_ARRAY_INSERT_DUPREC
Hello Expects,I have started remore client copy. Data was copied successfully. but while running pos

Read from forum
Haven't written anything forever and I would like to get back.
What I'm trying to do is getting t

Problems generating word documents on server side for security reasons
I have a problem with word documentation generation when generating a word document (docx) with PHP.

Request.UrlReferrer
I need to make it so that a page can only be loaded when a button is clicked on a specific page. I d

retrieving more than one max key from an array?
so i have an array of 20 numerical values (0-100) that i need to order from highest to lowest and th

Count Session and Trigger Events
I am New in PHP, seeking a method to count logged users by counting the sessions or any …, is

Form Help
Here is the form:

Line number On/Off | Expand/Contract<? include("../include/sess

Problem!
I have another problem, when i run this code i get this error "Parse error: syntax error, unexp

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