I’m trying to multiply some small numbers in PHP, but bcmul is returning zero because the float value is being turned into scientific notation. I tried using sprintf(‘%.32f’,$value) on the small float …
Remove “Home” and go direct to WooCommerce “Orders” on WordPress Admin dashboard
Using the most recent version of WooCommerce, there’s a “Home” section that I cannot remove using any built in setting. I have managed to remove the analytics and marketing option, but how …
WordPress Unable to upload images
For some days now, in the admin area you have had these errors: Uncaught SyntaxError: expected expression, got ‘<‘. on files moxie.min.js, plupload.min.js, wp-plupload.min.js This does not allow us to upload images to media galleries, pages, articles… When entering in Media Gallery we hav…
Custom Iterator with a callback
For my project, I have a DoctrineIterator created by a repository. This iterator returns an array based on my internal request. I need another iterator returning an object based on this array a generic solution (I have more than one occurrence of this) The usage of the second iterator is out of my scope, so a…
Pair key values that in same array – PHP
This is my JSON data: { “1”: “apple”, “2”: “banana”, “3”: “orange” … } I am trying to loop through and pair the values …
How to get sum and separate the total per Id in laravel
This is my query in my controller public function show($id) { $Days = DB::table(‘payroll_monthly_attn_project’)->where(‘payroll_monthly_id’,$id)->where(‘assign’,’PAINTING’) …
pass id of foreign key to the form via post
I’ve created a new field (“responsavel”) on my db for this entity (“Multa”), “responsavel” is a foreign key to another table (Usuario) and I want it to be shown on my …
Add TINYINT to Doctrine SQL types
Following Symfony doc, I tried to add TINYINT as entity column type. So far it works well, but two problem remain… Each time I want to perform a migration, Doctrine can’t reconize TINYINT for the …
Excel file can not be saved in PHP COM Application
we are having issues saving excel sheets in PHP. Minimalistic code: The call to save will throw a com_exception with message “Source: Microsoft Excel Description: Das Dokument wurde nicht gespeichert.” (German for “The document was not saved.”) When any worksheet of the workbook has be…
converting an object to an array in laravel
I’m trying to compare two arrays and use the difference of them to remove data from another array but as I use the resulting array to do a array_diff_key using an array_flip it returns; array_diff_key(): Expected parameter 1 to be an array, object given this is the code and I’ve tried converting t…