warning: number_format() expects parameter 1 to be double, string given in
The number_format() function requires a float type variable for its first parameter.

Try casting the parameter like this:

$html .= '&lt;div class="font-block-url-'.$key.'"&gt;&lt;span class="font-url"&gt;'.$fontValue-&gt;fontValue.'&lt;/span&gt;&lt;span class="preview-url"&gt;'.str_replace('.ttf','.png',$fontValue-&gt;fontValue).'&lt;/span&gt;&lt;span class="extra-price"&gt;'.number_format((float)($fontValue-&gt;price),2,'.','').'&lt;/span&gt;&lt;/div&gt;';