Jump to content

[SOLVED] datatype help


sasori

Recommended Posts

(im noob, so be patient)

let's say i want to create a class that accepts an integer and a float datatype, how will you code that?

should i create two different classes? like

 

class Customerorder

{

  private $total = 0;

    //the rest of the code here;

}

 

class Customerorder

{

private $total = 0.0; //for the float

//the rest of the code here;

}

 

is this thing good? or there's another way to write it using only a single class?

 

Link to comment
https://forums.phpfreaks.com/topic/118039-solved-datatype-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.