0

I am trying to echo the below in a new way but I get an error

old code

echo floor ($row ['avprice']);

New code , line 66

echo floor '<h5> '.($row ['avprice']).'</h5>';

Error

Parse error: syntax error, unexpected '"', expecting ',' or ';' in C:\wamp\www\boot\details1.php on line 66

I have tried changing the " and ' ' but no joy whatever I try. I m basically just trying to round the price down or just remove everything after the decimal place , so "no" decimal places.

Thanks

Anant Kumar Singh
  • 68,309
  • 10
  • 50
  • 94
Bill
  • 43
  • 1
  • 6

1 Answers1

2

I am sure you didn't tried this:-

echo '<h5>'. floor($row ['avprice']) .'</h5>'; 

You can do like below (what you asked in comment):-

echo '£<h5>'. floor($row ['avprice']) .'</h5>';

Or

echo '<h5>£'. floor($row ['avprice']) .'</h5>';
Anant Kumar Singh
  • 68,309
  • 10
  • 50
  • 94