Skip to content
Advertisement

the_field – ACF not working in ‘while’ loop

Main string of code (that doesn’t work): <span class=”price-in-kune”><?php the_field(‘tariff_price_kn’) ?> kn</span> The ways i tried to solve this problem: put insted of the_field(‘tariff_price_kn’) – echo(‘hi’) – the code worked add $post_id -> the_field(‘tariff_price_kn’, $post_id) $currencyKune = get_field(‘tariff_price_kn’); And then echo $currencyKune P.S 3) i don’t know exactly where should i put $currencyKune = get_field(‘tariff_price_kn’), so i put it before

Displaying php mysqli query result with one to many relationship

Current: Process Skill Process A Skill_1 Process A Skill_2 Process A Skill_3 Process B Skill_1 Process B Skill_2 Expected Result: Process Skill Process A Skill_1, Skill_2, Skill_3 Process B Skill_1, Skill_2 Sample SQL: Need help how to rearrange my one to many relationship table. Tried using array “$array= array($row[‘skill_req’]) ” but does not recognize the skill_req variable. Answer You’re looking

How to avoid SoapClient PHP to decode base64 response result?

Am using SoapClient (PHP) to retrieve data from a remote webservice. And I am able to communicate perfectly with this webservice. The request am sending is supposed to retrieve base64 encoded image data. It turned out that SoapClient automatically decode base64 response and the result looks like this: My question is how prevent this automatic decoding by SoapClient. My REST

Line up two tables

I have two following arrays: Now I want to take the common part of them, based on the date value, starting from the top and bottom, so the result should look like this: I have started with something like this: But it does not work, if there is a difference in the middle, how can I repair this? Answer Get

Is blacklist of opcache ignored when file_cache is enabled?

I am using php-fpm 7.4.3 on ubuntu 20.04. My blacklist of opcache doesn’t work at all. Scripts I visited are cached when file_cache is enabled. Here’s my configures. php.ini opcache_blacklist.txt test.php Some information from test.php There is a strange thing: everytime I refresh the test.php, blacklist_misses is increased by 1. If I disable file_cache (opcache.file_cache=) in php.ini, num_cached_scripts and num_cached_keys

Split string into two

So I have a php page which GETs a form with a string looking like this: FE:99792913V00.00.01.00038;SW:99792937V00.00.01.00022 I should like to make two string instead of one, looking like this: The only way I can think of doing this is by splitting with explode() and then implode it back to a string, but is this the best way? Answer Yes,

Need to change product images based on logged in user [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 days ago. This post was edited and submitted for review 2 days ago and failed to reopen the post: Original close reason(s) were not resolved Improve this question I have

Load a php file to get variable without loading the html? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 9 days ago. Improve this question I want to get a variable from a php file. I’ve read, that you can use include ‘mypage.php’; and then use the variable. But if

how to get month name from month-year (08-2022) string in php

how to get month name from month-year (08-2022) string in php i want to get this Aug-2022 (format) from my value 08-2022 I had tried date(‘m-Y’,strtotime(08-2022)) and date(’08-2022′)->format(‘m-Y’) but not working. Answer Just put a “01-” in front of your value to make it a valid date. try self: https://3v4l.org/ZiB70 or with DateTime: Important NOTE: That ! in the format

PHP Julian Date for JDE Oracle

i’m trying to convert a date like 2022-08-09 to a julian date for send it to JDE. The problem is that default php functions like juliantojd() return a different result. The result i expected was something like this https://nimishprabhu.com/tools/jde-julian-date-converter-online.html I got this function from a very old code that is doing the job in .asp I’m trying to convert this

Advertisement