Posts by Humberto Rodrigues • 109 points
4 posts
-
-1
votes2
answers59
viewsA: Error in data received in PHP
It is possible that this new hosting is with the PHP 7 version and in this version the number_format function expects the first parameter to be a float. Makes a type casting using the floatvar…
-
1
votes1
answer164
viewsA: Grouping arrays hierarchically PHP / Mysql
Look, as suggested in this topic https://stackoverflow.com/a/8587437/476, follows an example of recursive algorithm: function build_tree($nodes, $parent=0) { $branch = []; foreach($nodes as $node) {…
-
1
votes1
answer3295
viewsA: Failed to load PDF document
I have two suggestions: First try to see which text charset comes from your database, it may be that in the database you are using ISO-8859-1 and the lib DOMPDF user UTF-8 The documentation of this…
-
1
votes1
answer246
viewsA: How to delete all JPG files inside a folder using PHP
Look, you can do it this way: $files = glob('pasta_fotos/original*.jpg'); // obtém as imagens que começam com o nome "original" foreach($files as $file){ // percorre os arquivos encontrados…