-1

I am trying to add tab space to php function. i have try using multiple white spaces, '\t' but both are not working

this is my function

 public function getProductDescription()
  {
    return $this->name."\t". $this->carton_quantity .' * '. $this->weight.' g';
  }
eons
  • 388
  • 4
  • 21

2 Answers2

1

Use html_entity_decode()

public function getProductDescription()
{
    return html_entity_decode($this->name."    ". $this->carton_quantity .' * '. $this->weight.' g');
}
nealio82
  • 2,611
  • 1
  • 17
  • 19
Sandeep
  • 47
  • 4
-2

Please try the combination of

 

For example,

public function getProductDescription()
{
    return html_entity_decode($this->name."    ". $this->carton_quantity .' * '. $this->weight.' g');
}