Hey all i am new at classes and arrays in php but need to find out how to go about getting the correct value from this class function array
class theCart {
public static $DISTANCE = array(
'0' => '0 - 75',
'10' => '76 - 125',
'20' => '126 - 175',
'30' => '176 - 225',
'40' => '226 - 275',
'50' => '276 - 325'
);
}
My output i am trying to match looks like this: 76 - 125
Do i just call it like
$distanceNum = '76 - 125';
$tmpDistanceTotal = $DISTANCE($distanceNum);
Should $tmpDistanceTotal then have a value of 10? I'm thinking that the array only has the values 0,10,20,30,40,50 in it?
I have another array:
public static $STEPS = array(
'0' => 0,
'1' => 0,
'2' => 0,
'3' => 25,
'4' => 50,
'5' => 75,
'6' => 100,
'7' => 125
);
My output i am trying to match with that above is 3 I'm not sure if its looking for a string or not?