Skip to content
Advertisement

Tag: loops

Wrong author ID output from elementor module

I create a module for elementor. I need to display the author name, choosen from the elementor admin control. I have 4 administrator. They show up correctly on control panel: admin (ID=0.) Jhon Doe (ID=1.) Jeane Doe (ID=3.) Mary Doe (ID=5.) The code for Elementor admin panel: When I choose Jeane Doe from Elementor control admin, the output on the

php loop show current year data if not found instead of skiping

So I have a loop within a loop both have year data and I’m trying to figure out how to show current year (2021) data if years don’t match or exist on loop instead of using continue to skip the entry, any ideas or solutions are appreciated. LIVE CODE: http://sandbox.onlinephpfunctions.com/code/b7cbef0613636aa41a41a7d5f283a2569ece9cb0 So this is the OUTPUT I get: And this is

Attempting something new in WP. Issue resetting WP loop

Im working in WP and basically what I’ve got set up is some logic to create a separate carousel for each category of my blog. For each carousel im displaying the top viewed posts for each category. Each Item in the carousel has a post thumbnail, author name and author avatar. My problem(if you scroll down to the bottom of

PHP exceeding memory allocation in nested loops

I am parsing a string. If it meets a certain criteria, I want to append the new character to another substring until it stops meeting that criteria, and / or the end of the string. The code is basically as follows: The error that follows is: PHP message: PHP Fatal error: Allowed memory size of 805306368 bytes exhausted (tried to

How to get array from list

I have a problem for my program. This my script: and this is my result result page I want to replace the words “count” with the sum of each column in the same row. and my question, how I can add all column in one rows. example : row 1 = 1 + 0.5 + 0,33 + 0.25 = 2,08

Advertisement