Posts by Felipe Torretto • 94 points
5 posts
-
2
votes3
answers1130
viewsA: How to format a php array
If you want to see the contents of the array it is not necessary to run a foreach, just use the tag pre HTML together with the function print_r of PHP in this way: echo '<pre>'.print_r($array,…
-
0
votes2
answers86
viewsA: as "cachear" css concatenated via GET
You can store the result of the concatenation in a new CSS file and access it during a certain period until the cache expires. <?php if (empty($_GET['files'])) die(); // Configurações…
-
1
votes1
answer264
viewsA: SELECT operation in PHP with SQL Server 2008
When executing the command echo you are just printing the contents of the variable $seleciona, but this will not perform the query in the database let alone bring the desired result. The correct is…
-
1
votes2
answers315
viewsA: Fill missing numbers from a sequence
The solution is to first create an array with all desired times and zero values, then just update the array with the values you have. Below the code that shows it: // O resultado obtido do banco de…
-
0
votes2
answers160
viewsA: php array converted to json does not maintain order in mysql
To sort an array down you must use the function krsort, but this function will keep the original keys. If you want to ensure this new order, you can use array_values to get a copy of the array with…