how to create a dynamic array? I need to set the dynamic value of product id and qty and passing into the items array. $itemarray = []; foreach ($ItemCollection as $item) { $productId = $item[‘…
Tag: php
XML parsing is not working when it’s only one array
I am parsing the xml like following: $result = ‘ 0 11111…
Laravel email shows images fine in Mailtrap but not visible in Gmail
I am using a simple Laravel Mailable below and have the header image displayed at the top of the email – this displays fine when going through Mailtrap.io but when the same email is sent to my Gmail …
Amazon GetOrder API for my own seller Account [closed]
I’m a php developer, please help, i have my own Amazon seller account, and i want to use Amazon GetOrder API for my purchase order website. Please help what step should i take.
Vanilla php files in subfolder with laravel – page not found error
I have a laravel app: https://laravel-app.com I want to serve custom pages from a folder on the same domain https:laravel-app.com/player/player.php I have set the .htaccess file But when I try and navigate to that page by using this direct url: https:laravel-app.com/player/player.php I get the laravel routing…
Headers already sent error with get_template_part in REST API call
I’ve looked at multiple other questions about this warning (Headers already sent…etc) and this thorough explanation, but I’m not finding a solution for the circumstances I’m dealing with: I have a custom WordPress REST API endpoint that returns the output of get_template_part. When I j…
PHP behaving strange in for loop with associative array
the attached image is self-explanatory. I think its not new, but i’d like to understand the details behind it. So to summarize my problem, when an associative array, that has only string keys, is passed to a basic for loop, it overflows, when i assign a value to one of its – previously non existan…
Warning mkdir() Permission Denied on Google APP Engine PHP Application
I am running CodeIgniter PHP Framework on Google APP Engine using flex environment. Everything is going well except for one small issue, I unable to create folder and upload files because of mkdir …
Is there way to pass Symfony variables to translation without keys
we are now using custom translations for our project in PHP and I want to migrate them to Symfony ones. Everything looks great, but my only concern is that variable placeholders needs key to bind successfully, can I somehow change the code to accept translation variables in sequence (without keys)? Let me sho…
Display WooCommerce Product Dimensions via a Shortcode
I am creating a custom layout (using Elementor) for a product – what I need is to have the dimensions of a product to display in a custom tab I have created. Is there a shortcode for product dimensions? (some of the products are variable too if that makes a difference) I have managed to get some code to…