0

With this correct I can post tag {price} to controller, then replace and get value price from database:

$template = str_replace('{price}', $row['price'], $template);

But the problem is, in my database price have value example: 42277 so this is 422,77 euro.

So I now I try format tis number using: number_format

I try:

$template = str_replace('{price}', number_format(($row['price'], 2, '.', '') $template));

But I get:

Message: syntax error, unexpected ','

in validator php this issue said about this last ,

$template = str_replace('{price}',
Lucas
  • 31
  • 5

0 Answers0