The category id is delivered, but it is not clear to me why the products of this selected category are not displayed Answer Try this – Category IDs should be integer
Extract content with Xpath and data attribute
I need to extract the content of the following div tag which has the data-visible=”1″ attribute and contains the div id “line”. I tried it like that, but I dont get any result. What is the right way to extract the content with these both conditions and get the result: Answer Since this…
php IBM Watson Speech to text “unable to transcode data stream audio/flac ” error
I am trying to use IBM Watson’s speech-to-text service using PHP. I don’t know much about the curl language. In the documentation of IBM cloud, there’s this curl code: I used a curl to PHP converter service and got this: I am working on a server, my overall PHP code successfully connects to …
Otp is not post in database
after user submit mail id otp will be sent to that email id but my code isn’t working it post the email id in database but not the otp. Please can any one help? Controller Code auth.php Model code user_model.php Answer In your controller you are actually passing three arguments to the $this->user_mod…
How do I add a custom key to mysql information_schema.COLUMNS
Im using this mysql statement SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ‘$dbck’ AND TABLE_NAME = ‘$tbck’ AND COLUMN_NAME = ‘$field_param’”. How can I add a custom key to the mysql information_schema.columns to look like this? Answer You can create and fi…
Transition of Woocommerce Percentage Review Chart to Numeric
On my website’s homepage, I use a chart that counts all Woocommerce reviews. These reviews are shown as a percentage for each rating (1 star, 2 star etc …). I need to change functionality to the total number of ratings for each rating section instead of the percentage and display stars instead of …
DRY and Typing Specialization
while I was learning PHP, I thought of a (simple?) problem that I could not solve “properly”. Here it is: I would like to create multiple “specialized containers” I would like to avoid duplicated code For example: So, I could then create “specialized” bag: I understood that…
PHP modify fetched variable and return to frontend for JS
Im fetching Product Attributes from Woocommerce, and echo them out in a script tag as variable to use with javascript in frontend. This might be a bad practice, feel free to enlighten me. Example: Product Attributes: Total height: 43m Total length: 55m PHP queries “Total-height” as Attribute Name …
Handling PHP URL and GET requests
I am currently parsing any given url, for example example.com/page/1 or example.com/api/info/1, by exploding the URL: and then accessing its elements in the array like so: But how could I handle (and access via array in the same way) a url that also includes GET elements, such as example.com/page?id=1 or exam…
change page HTML after change dropdown
I have 2 pages and the main page. the total 3 pages. I want to access the first and second pages after changing the dropdown list. I try this code by Jquery in my HTML called main.html. I want to use the if statement. If select 1 load firstPage.html If select 2 load secondtPage.html Any Edition of this code. …